-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make the parser aware of await where macro calls are expected #60653
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
Comments
Hi, I will like to work on this bug. Going through the code which the linked PR added, looks like we need more smarter parsing here: https://github.com/rust-lang/rust/pull/60586/files#diff-da9d34ca1d0f6beee2838cf02e07345cR2754. Does that sound right? |
@Pulkit07 I think you might have to look further down. The error is emitted in
This error is caused by the line below the place you linked, |
FWIW this will all be trivially fixed when we remove support for the old |
This makes the parser to first check for '!' and see if it exists or not before parsing it as `await!`. This is done because a proposed new syntax for await is `expression.await` and hence await keyword can be used without `!`. It fixes rust-lang#60653
Current output:
I don't think that we can improve here because it'd be hard to interpret further intent from the available code. |
In the recent inclusion of the
await
parsing, some tests regressed slightly because the parser now assumes a macro call is happening without checking if it is a keyword identifier being misused, so it complains about a missing!
:The text was updated successfully, but these errors were encountered: