-
Notifications
You must be signed in to change notification settings - Fork 13.3k
elaborate: avoid projections with unconstrained bound regions #136303
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
Conversation
@bors try |
… r=<try> elaborate: avoid projections with unconstrained bound regions Should only do this for where-bounds and item bounds. Gonna rewrite later I think. This means we'll no longer need to support unconstrained regions in implied bounds, see lcnr/random-rust-snippets#15. This fixes ```rust trait Super { type SAssoc; } trait Trait<'a>: Super<SAssoc = <Self as Trait<'a>>::TAssoc> { type TAssoc; } fn test<'a, T: 'a>() {} fn unconstrained_lt<'arg, T: for<'a> Trait<'a>>(x: &'arg <T as Super>::SAssoc) { test::<'arg, <T as Super>::SAssoc>(); } ``` but breaks ```rust trait Super { type SAssoc; } trait Trait<'a>: Super<SAssoc = <Self as Trait<'a>>::TAssoc> { type TAssoc; } fn test<'a, T: 'a>() {} fn unconstrained_lt<'arg, T: for<'a> Trait<'a, TAssoc = usize>>(x: <T as Super>::SAssoc) -> usize { x } ``` r? `@compiler-errors`
The job Click to see the possible cause of the failure (guessed by this bot)
|
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
there are at least 3 actual regressions here:
That makes me really unhappy :/ |
@rustbot author -- should we close this now that we decided that we're gonna allow these projections? 🤔 |
Should only do this for where-bounds and item bounds. Gonna rewrite later I think.
This means we'll no longer need to support unconstrained regions in implied bounds, see lcnr/random-rust-snippets#15. This fixes
but breaks
r? @compiler-errors