Skip to content

Commit 5f82e22

Browse files
committed
Don't rebind in transitive_bounds_that_define_assoc_type
1 parent 31ae3b2 commit 5f82e22

File tree

1 file changed

+1
-3
lines changed
  • compiler/rustc_infer/src/traits

1 file changed

+1
-3
lines changed

compiler/rustc_infer/src/traits/util.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,7 @@ pub fn transitive_bounds_that_define_assoc_type<'tcx>(
305305
Some(assoc_name),
306306
));
307307
for (super_predicate, _) in super_predicates.predicates {
308-
let bound_predicate = super_predicate.kind();
309-
let subst_predicate = super_predicate
310-
.subst_supertrait(tcx, &bound_predicate.rebind(trait_ref.skip_binder()));
308+
let subst_predicate = super_predicate.subst_supertrait(tcx, &trait_ref);
311309
if let Some(binder) = subst_predicate.to_opt_poly_trait_ref() {
312310
stack.push(binder.value);
313311
}

0 commit comments

Comments
 (0)