-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Lifetime in GAT must outlive trait parameters #91036
Comments
Do you need a GAT here? Lifetime |
Not really. Lifetime See #56238 (comment) for more info |
Yeah, this looks weird |
Thanks @ilslv, turns out it is possible to code rust for quite a while without properly understanding lifetimes. |
Having the same issue with the latest nightlies:
|
…r=nikomatsakis GATs outlives lint: Try to prove bounds Fixes rust-lang#91036 Fixes rust-lang#90888 Fixes rust-lang#91348 (better error + documentation to be added to linked issue) Instead of checking for bounds directly, try to prove them in the associated type environment. Also, add a bit of extra information to the error, including a link to the relevant discussion issue (rust-lang#87479). That should be edited to include a brief summary of the current state of the outlives lint, including a brief background. It also might or might not be worth it to bump this to a full error code at some point. r? `@nikomatsakis`
Related to #89970
Code
Basically I want to desugar
async fn
. For this I need to describeFut
GAT that lives the smallest of the'me
and'ctx
, but I get compiler error with requirement that doesn't really make sense to me.'out
cant't outlive'ctx
.Meta
fails on
1.58.0-nightly (2021-11-18 cc946fcd326f7d85d4af)
PlaygroundThe text was updated successfully, but these errors were encountered: