]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_borrowck/src/diagnostics/mod.rs
Rollup merge of #107103 - compiler-errors:new-solver-evaluate_obligation, r=lcnr
[rust.git] / compiler / rustc_borrowck / src / diagnostics / mod.rs
index 1b40b7143cbb6b671ba2faec06326c362a669de8..1011794d7b3b2995671c2946070a4f59df385fcb 100644 (file)
@@ -1064,7 +1064,7 @@ fn explain_captures(
                         );
                     }
                 }
-                CallKind::Normal { self_arg, desugaring, method_did } => {
+                CallKind::Normal { self_arg, desugaring, method_did, method_substs } => {
                     let self_arg = self_arg.unwrap();
                     let tcx = self.infcx.tcx;
                     if let Some((CallDesugaringKind::ForLoopIntoIter, _)) = desugaring {
@@ -1136,7 +1136,7 @@ fn explain_captures(
                             && let self_ty = infcx.replace_bound_vars_with_fresh_vars(
                                 fn_call_span,
                                 LateBoundRegionConversionTime::FnCall,
-                                tcx.fn_sig(method_did).input(0),
+                                tcx.fn_sig(method_did).subst(tcx, method_substs).input(0),
                             )
                             && infcx.can_eq(self.param_env, ty, self_ty).is_ok()
                         {