Move binder for dyn to each list item

This commit is contained in:
Jack Huey 2020-12-11 15:02:46 -05:00
parent 58d2bad9f7
commit ed80815bf2
25 changed files with 307 additions and 261 deletions

View file

@ -184,8 +184,8 @@ where
ty::Dynamic(predicates, ..) => {
// All traits in the list are considered the "primary" part of the type
// and are visited by shallow visitors.
for predicate in predicates.skip_binder() {
let trait_ref = match predicate {
for predicate in predicates {
let trait_ref = match predicate.skip_binder() {
ty::ExistentialPredicate::Trait(trait_ref) => trait_ref,
ty::ExistentialPredicate::Projection(proj) => proj.trait_ref(tcx),
ty::ExistentialPredicate::AutoTrait(def_id) => {