about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
diff options
context:
space:
mode:
authorYoshitomo Nakanishi <yurayura.rounin.3@gmail.com>2024-03-05 20:19:05 +0100
committerYoshitomo Nakanishi <yurayura.rounin.3@gmail.com>2024-03-07 13:56:29 +0100
commit96699347989d1e6fc43805dd374f8289cbb8fcad (patch)
tree7dbf2330079ca3a34fd76bf33ee61174dc4841fa /compiler/rustc_trait_selection/src/traits/specialize/mod.rs
parent8c9a75b3238b66592779d6b240dbf78eacefebb8 (diff)
downloadrust-96699347989d1e6fc43805dd374f8289cbb8fcad.tar.gz
rust-96699347989d1e6fc43805dd374f8289cbb8fcad.zip
Apply `EarlyBinder` only to `TraitRef` in `ImplTraitHeader`
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/specialize/mod.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/specialize/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
index f5bc6c3ad2c..27dd8f26489 100644
--- a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
@@ -169,7 +169,7 @@ pub(super) fn specializes(tcx: TyCtxt<'_>, (impl1_def_id, impl2_def_id): (DefId,
         }
     }
 
-    let impl1_trait_header = tcx.impl_trait_header(impl1_def_id).unwrap().instantiate_identity();
+    let impl1_trait_header = tcx.impl_trait_header(impl1_def_id).unwrap();
 
     // We determine whether there's a subset relationship by:
     //
@@ -198,7 +198,7 @@ pub(super) fn specializes(tcx: TyCtxt<'_>, (impl1_def_id, impl2_def_id): (DefId,
     fulfill_implication(
         &infcx,
         penv,
-        impl1_trait_header.trait_ref,
+        impl1_trait_header.trait_ref.instantiate_identity(),
         impl1_def_id,
         impl2_def_id,
         |_, _| ObligationCause::dummy(),