Skip to content

Commit

Permalink
Don't rebind in transitive_bounds_that_define_assoc_type
Browse files Browse the repository at this point in the history
  • Loading branch information
jackh726 committed Apr 28, 2021
1 parent 31ae3b2 commit 5f82e22
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_infer/src/traits/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,7 @@ pub fn transitive_bounds_that_define_assoc_type<'tcx>(
Some(assoc_name),
));
for (super_predicate, _) in super_predicates.predicates {
let bound_predicate = super_predicate.kind();
let subst_predicate = super_predicate
.subst_supertrait(tcx, &bound_predicate.rebind(trait_ref.skip_binder()));
let subst_predicate = super_predicate.subst_supertrait(tcx, &trait_ref);
if let Some(binder) = subst_predicate.to_opt_poly_trait_ref() {
stack.push(binder.value);
}
Expand Down

0 comments on commit 5f82e22

Please sign in to comment.