-
Notifications
You must be signed in to change notification settings - Fork 13.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
Prevent await from creating a generator #51719
Comments
Is there an explanation somewhere of why this is necessarily bad? |
@BatmanAoD The fact that |
Ah, okay. Is there any compelling reason to permit |
@BatmanAoD Non- |
Oh, I didn't notic that the Inside of |
Should this be tagged as AsyncAwait-Blocker? |
Yup! |
(but it's also in the group of issues that would be obviously fixed by native syntax) |
Implement built-in await syntax Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature. This new syntax is not final, but is the consensus solution proposed by the lang team, as explained in https://boats.gitlab.io/blog/post/await-decision/ Fix #51719 Fix #51751 Fix #60016
The await macro implemented in #51580 can be abused to create a generator (e.g.
|| await!()
). This shouldn't be allowed.The text was updated successfully, but these errors were encountered: