-
Notifications
You must be signed in to change notification settings - Fork 0
AliasBound
+ ParamEnv
candidate eq modulo regions
#90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was marked as outdated.
This comment was marked as outdated.
minimized trait Bound<'a> {}
trait Trait<'a> {
type Assoc: Bound<'a>;
}
fn foo<'a, T>()
where
T: Trait<'a>,
<T as Trait<'a>>::Assoc: Bound<'a>,
{} checking that Thanks to @BoxyUwU for actually figuring this out ❤️ |
notes: We first considered that this should be solvable by not uniquifying regions in the We already dedup equal clauses in the param env, which is why Alternatively: open a PR to salsa removing the trivial-bound 😁 and check whether this pattern is more widespread |
further thought: this pattern is likely also possible when checking that the impl item where-bounds are implied by the instantiated trait item where-bounds. should get a test for that. In this case it is not possible to simply remove the trivial where-bound |
from @BoxyUwU this affects |
We should make sure we write a test that alias bounds from a nested alias as the self type also are factored into this (i.e. decide whether we want to filter those out too or not and then have a test that will fail if we change that behaviour). Something like |
Another noteworthy thing is that the solver doesnt assemble alias bounds for non rigid aliases so if we have a where clause like
|
This impacts core: trait Pattern<'a> {
type Searcher: Searcher<'a>;
}
trait Searcher<'a> {}
fn rsplit_terminator<'a, P>()
where
P: Pattern<'a>,
P::Searcher: Searcher<'a>,
{
} |
Uh oh!
There was an error while loading. Please reload this page.
fixed by preferring where-bounds over alias-bounds
results in
minimized from
salsa
feels related to #89 but also affects nightly
The text was updated successfully, but these errors were encountered: