-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Place tail expression behind terminating scope #125293
base: master
Are you sure you want to change the base?
Place tail expression behind terminating scope #125293
Conversation
rustbot has assigned @petrochenkov. Use |
cc @traviscross for edition 2024 update cc @eholk for context who has worked on async iterator |
r? compiler |
This comment was marked as resolved.
This comment was marked as resolved.
21d1190
to
2f0ad0d
Compare
75d038e
to
66c2762
Compare
66c2762
to
5b86c0d
Compare
r? @estebank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'll let Esteban review it too
This PR implements #123739 so that we can do further experiments in nightly.
A little rewrite has been applied to
for await
lowering. It was previouslyunsafe { Pin::unchecked_new(into_async_iter(..)) }
. Under the edition 2024 rule, however,into_async_iter
gets dropped at the end of theunsafe
block. This presumably the first Edition 2024 migration rule goes by hoistinginto_async_iter(..)
intomatch
one level above, so it now looks like the following.