]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/sub.rs
Replacing bound vars is actually instantiating a binder
[rust.git] / compiler / rustc_infer / src / infer / sub.rs
index 51c34f0d55f6ff715336cc2b45d53c3e2df19a16..532fbd0ffe4c40c685a47ef74098d5945fdacd60 100644 (file)
@@ -161,7 +161,7 @@ fn tys(&mut self, a: Ty<'tcx>, b: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
                 let a_types = infcx.tcx.anonymize_bound_vars(a_types);
                 let b_types = infcx.tcx.anonymize_bound_vars(b_types);
                 if a_types.bound_vars() == b_types.bound_vars() {
-                    let (a_types, b_types) = infcx.replace_bound_vars_with_placeholders(
+                    let (a_types, b_types) = infcx.instantiate_binder_with_placeholders(
                         a_types.map_bound(|a_types| (a_types, b_types.skip_binder())),
                     );
                     for (a, b) in std::iter::zip(a_types, b_types) {