X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_borrowck%2Fsrc%2Fdiagnostics%2Fmod.rs;fp=compiler%2Frustc_borrowck%2Fsrc%2Fdiagnostics%2Fmod.rs;h=3006e27e1d5b53882bfaa8528bcee7b4f8ab849b;hb=03a8a4ff3e7cf0633ceaf0a5fa8d347cfe49e809;hp=a75ec87be4cac0721b6cdfc58fa3b095c7959048;hpb=bd39bbb4bb92df439bf6d85470e296cc6a47ffbd;p=rust.git diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index a75ec87be4c..3006e27e1d5 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -1139,7 +1139,7 @@ fn explain_captures( if let ty::Adt(def, substs) = ty.kind() && Some(def.did()) == tcx.lang_items().pin_type() && let ty::Ref(_, _, hir::Mutability::Mut) = substs.type_at(0).kind() - && let self_ty = infcx.replace_bound_vars_with_fresh_vars( + && let self_ty = infcx.instantiate_binder_with_fresh_vars( fn_call_span, LateBoundRegionConversionTime::FnCall, tcx.fn_sig(method_did).subst(tcx, method_substs).input(0),