diff --git a/src/librustc_typeck/check/vtable.rs b/src/librustc_typeck/check/vtable.rs index f153b51c5df..15e942006f0 100644 --- a/src/librustc_typeck/check/vtable.rs +++ b/src/librustc_typeck/check/vtable.rs @@ -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 \ diff --git a/src/librustc_typeck/variance.rs b/src/librustc_typeck/variance.rs index de0b0a7ad35..cd8bc94b111 100644 --- a/src/librustc_typeck/variance.rs +++ b/src/librustc_typeck/variance.rs @@ -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.