Skip to content
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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

eholk
Copy link
Contributor

@eholk eholk commented Sep 7, 2021

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
Copy link
Contributor Author

eholk commented Sep 7, 2021

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

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2021

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.

@Mark-Simulacrum
Copy link
Member

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.

@eholk
Copy link
Contributor Author

eholk commented Sep 29, 2021

@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 eholk force-pushed the async-liveness-auto-traits branch from f0ddca7 to 652008e Compare September 29, 2021 16:26
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.
@eholk eholk force-pushed the async-liveness-auto-traits branch from 652008e to e810f63 Compare September 29, 2021 17:50
@eholk
Copy link
Contributor Author

eholk commented Sep 29, 2021

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.
@eholk eholk force-pushed the async-liveness-auto-traits branch from e810f63 to c91c126 Compare September 29, 2021 18:28
@traviscross
Copy link
Contributor

@rustbot author

@rustbot rustbot added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Oct 22, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

☔ The latest upstream changes (possibly bf115a4) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. T-lang Team: Lang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants