-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fulfill additional higher-kinded "outlives" predicates #27113
Comments
This doesn't actually have to do with diagnostics. A more accurate label would be |
@nikomatsakis Any advice for progressing on this? |
Ping. |
@apasel422 heh, sorry. I think that solving this is actually going to be a bit tricky. What we really want to do, I think, is refactor how the trait resolution code works so that we can more easily introduce predicates into the environment and check under those assumptions. But probably there's an easier, shorter-term fix here, even if it covers less ground. |
I ran into this issue, and as I understand it's not possible without some work on Higher Kinded Lifetimes. Dunno if this is the correct bug to comment on, but I just wanted to note that it seems like it makes it impossible to implement ToOwned for a trait... |
Is there any progress on this issue? Are Polonius or Chalk going to fix this? I can reproduce it with something as simple as trait Foo where for<'a> &'a u64: 'a {} |
Triage: resolved Both examples compile on stable I think we can close this one |
remove E0280 After looking at rust-lang#61137 I tried my hand at E0280. I'm unable to find a reasonable example that emits the error. There are a couple of old examples that compile with the current compiler ([rust-lang#26217](rust-lang#26217), [rust-lang#42114](rust-lang#42114), [rust-lang#27113](rust-lang#27113)) and there is a [bug with chalk](https://github.com/rust-lang/rust/blob/b7cdb635c4b973572307ad288466fba64533369c/src/test/ui/chalkify/bugs/async.rs) that makes it emit the error, with a couple more chalk bugs on zulip. It seems like the error is supposed to be emitted from unfulfilled where bounds, of which two are related to borrow checking (error in where T: 'a or where 'a: 'b) and thus tend to emit errors like "lifetime may not live long enough" from borrow checking instead. The final case is with type equality constraints (where <T as Iterator>::Item == u32), which is unimplemented ([rust-lang#20041](rust-lang#20041)). That such different problems are supposed to have the same error code also seems strange to me. Since the error seems to only be emitted when using chalk I propose to remove it and replace it with an ICE instead. A crater run might be warranted. Pinging `@jackh726` due to removal of chalk test that now ICEs.
@rustbot label +E-needs-test |
Types fail to fulfill higher-kinded "outlives" predicates when the higher-kinded region is present on the left-hand side of the predicate. For example:
CC @nikomatsakis.
The text was updated successfully, but these errors were encountered: