Rollup merge of #139828 - compiler-errors:rigid-trait, r=lcnr
Don't require rigid alias's trait to hold See test for write-up. TL;DR is that we don't need the trait bound to hold, since we enforce it during WF. I think this is preferable to introducing (if we even could do so) a more specific hack around coroutine interiors, higher ranked types, etc, since this is just a manifestation of more pervasive issues w/ lifetime erasure in coroutines. This just doesn't manifest in the old solver b/c it doesn't try to prove `T: Trait` holds when rigidly projecting `<T as Trait>::Assoc`. It's pretty clear that this affects quite a few traits (https://github.com/rust-lang/rust/pull/139763), so I think this needs fixing. r? lcnr Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/177
This commit is contained in:
commit
c594a88f43
2 changed files with 41 additions and 1 deletions
|
@ -45,7 +45,6 @@ where
|
|||
goal,
|
||||
goal.predicate.alias,
|
||||
);
|
||||
this.add_goal(GoalSource::AliasWellFormed, goal.with(cx, trait_ref));
|
||||
this.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue