]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_typeck/src/closure.rs
Replacing bound vars is actually instantiating a binder
[rust.git] / compiler / rustc_hir_typeck / src / closure.rs
index 90c4e5b6540b0ed511edacc08a34ec8b8628f11b..211fe477a2d8d77bd77890602796e55bfe103a80 100644 (file)
@@ -544,7 +544,7 @@ fn merge_supplied_sig_with_expectation(
             )
             .map(|(hir_ty, &supplied_ty)| {
                 // Instantiate (this part of..) S to S', i.e., with fresh variables.
-                self.replace_bound_vars_with_fresh_vars(
+                self.instantiate_binder_with_fresh_vars(
                     hir_ty.span,
                     LateBoundRegionConversionTime::FnCall,
                     // (*) binder moved to here
@@ -566,7 +566,7 @@ fn merge_supplied_sig_with_expectation(
                 all_obligations.extend(obligations);
             }
 
-            let supplied_output_ty = self.replace_bound_vars_with_fresh_vars(
+            let supplied_output_ty = self.instantiate_binder_with_fresh_vars(
                 decl.output.span(),
                 LateBoundRegionConversionTime::FnCall,
                 supplied_sig.output(),