-
Notifications
You must be signed in to change notification settings - Fork 501
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
Document using liveness to infer auto traits for async blocks #1088
base: master
Are you sure you want to change the base?
Conversation
@rustbot label +I-nominate +T-lang I'd appreciate some feedback. I'm also open to doing a video or chat meeting if that's helpful. |
Error: Label I-nominate can only be set by Rust team members Please let |
Niko mentioned this in today's T-lang meeting and I raised that it'd be good to document the current state for this inference before adding changes, so that there's a good diff to look at. |
@Mark-Simulacrum - That's a good idea, I'll put up a PR documenting the current rules and then rebase this one on top of that so that the differences are clearer. |
f0ddca7
to
652008e
Compare
We are in the process of changing this (rust-lang/#69663), but it would be good to document the existing rules before changing them. This should also help explain the compilation errors people are getting in the meantime.
652008e
to
e810f63
Compare
I just pushed #1093 which documents the current behavior. This PR now includes that one as well, so once we merge that one it will be easier to see what is changing. |
This documents the proposed liveness-based rules for inferring auto traits for async block. Currently we use a scope-based approach, so this also serves as a description of we would like to change.
e810f63
to
c91c126
Compare
@rustbot author |
☔ The latest upstream changes (possibly bf115a4) made this pull request unmergeable. Please resolve the merge conflicts. |
In order to fix some of the issues around overly conservative generator captures (rust-lang/rust#69663), I am working on changing the analysis to be based on liveness of values rather than their scope. This is an update to the reference that describes how I propose things to work in the future, and I'd appreciate some feedback on it. Obviously we shouldn't merge this until the rustc changes are ready too, but I at least wanted to notify the lang team and get some feedback.