reference icon indicating copy to clipboard operation
reference copied to clipboard

Document using liveness to infer auto traits for async blocks

Open eholk opened this issue 4 years ago • 7 comments

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.

eholk avatar Sep 07 '21 21:09 eholk

@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.

eholk avatar Sep 07 '21 21:09 eholk

Error: Label I-nominate can only be set by Rust team members

Please let @rust-lang/release know if you're having trouble with this bot.

rustbot avatar Sep 07 '21 21:09 rustbot

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 avatar Sep 28 '21 17:09 Mark-Simulacrum

@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.

eholk avatar Sep 29 '21 16:09 eholk

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.

eholk avatar Sep 29 '21 17:09 eholk