We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31ae3b2 commit 5f82e22Copy full SHA for 5f82e22
compiler/rustc_infer/src/traits/util.rs
@@ -305,9 +305,7 @@ pub fn transitive_bounds_that_define_assoc_type<'tcx>(
305
Some(assoc_name),
306
));
307
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()));
+ let subst_predicate = super_predicate.subst_supertrait(tcx, &trait_ref);
311
if let Some(binder) = subst_predicate.to_opt_poly_trait_ref() {
312
stack.push(binder.value);
313
}
0 commit comments