about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/coherence.rs
diff options
context:
space:
mode:
authorKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-02-06 17:48:12 -0700
committerKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-02-16 17:01:52 -0700
commitd822b97a27e50f5a091d2918f6ff0ffd2d2827f5 (patch)
treedd0aae1c09476ba8d74e83999cadc77266ae2c20 /compiler/rustc_trait_selection/src/traits/coherence.rs
parent9a7cc6c32f1a690f86827e4724bcda85e506ef35 (diff)
downloadrust-d822b97a27e50f5a091d2918f6ff0ffd2d2827f5.tar.gz
rust-d822b97a27e50f5a091d2918f6ff0ffd2d2827f5.zip
change usages of type_of to bound_type_of
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/coherence.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/coherence.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs
index a95694e5144..bc639094fdd 100644
--- a/compiler/rustc_trait_selection/src/traits/coherence.rs
+++ b/compiler/rustc_trait_selection/src/traits/coherence.rs
@@ -82,8 +82,8 @@ pub fn overlapping_impls(
         (Some(a), Some(b)) => iter::zip(a.skip_binder().substs, b.skip_binder().substs)
             .all(|(arg1, arg2)| drcx.generic_args_may_unify(arg1, arg2)),
         (None, None) => {
-            let self_ty1 = tcx.type_of(impl1_def_id);
-            let self_ty2 = tcx.type_of(impl2_def_id);
+            let self_ty1 = tcx.bound_type_of(impl1_def_id).skip_binder();
+            let self_ty2 = tcx.bound_type_of(impl2_def_id).skip_binder();
             drcx.types_may_unify(self_ty1, self_ty2)
         }
         _ => bug!("unexpected impls: {impl1_def_id:?} {impl2_def_id:?}"),