-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Make inline attributes apply to the generated poll in async fn
#149245
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
base: main
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @JonathanBrouwer. Use |
This comment has been minimized.
This comment has been minimized.
46d6c3e to
d89022a
Compare
This comment has been minimized.
This comment has been minimized.
… instead of the desugared creator function.
2757a30 to
9478bfd
Compare
9478bfd to
fa35f7b
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
|
☔ The latest upstream changes (presumably #149853) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR adds lowering code (similar to how track_caller forwarding works) to
async fnitems andasync ||closures such that any inline attributes put on them are inherited by the generated coroutine (corresponding to thepoll()implementation) and are not applied to the outer function. This behavior matches the accepted FCP in the first linked issue.Code like the following now correctly codegen 3 functions
async_fn_test::consumerasync_fn_test::hi::{closure#0}core::ptr::drop_in_place::<async_fn_test::hi::{closure#0}>Fixes #129347 and fixes #106765.