rustc_typeck: unbox closures used in let bindings

This commit is contained in:
Jorge Aparicio 2014-12-30 20:59:12 -05:00
parent e47035b9a5
commit e9ddd825ba
2 changed files with 2 additions and 2 deletions

View file

@ -223,7 +223,7 @@ fn check_object_safety_inner<'tcx>(tcx: &ty::ctxt<'tcx>,
}
// reason (a) above
let check_for_self_ty = |ty| {
let check_for_self_ty = |&: ty| {
if contains_illegal_self_type_reference(tcx, object_trait.def_id(), ty) {
Some(format!(
"cannot call a method (`{}`) whose type contains \

View file

@ -593,7 +593,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
// parameter (by inspecting parent of its binding declaration
// to see if it is introduced by a type or by a fn/impl).
let check_result = |this:&ConstraintContext| -> bool {
let check_result = |&: this:&ConstraintContext| -> bool {
let tcx = this.terms_cx.tcx;
let decl_id = this.find_binding_for_lifetime(param_id);
// Currently only called on lifetimes; double-checking that.