-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
False positive in keyword_idents_2024
#124862
Comments
This was preexisting in the lint (fires for |
I was just looking into it myself. I think it's a two line fix? Copying what's done for |
That's too heavy of a hammer, and will cause this test to not fail even though it should:
|
We should specifically be detecting macro vars that have keyword names instead. |
But if you're looking into it already, be my guest. Just make sure to claim it next time :) |
Nah, go ahead! I merely saw the PR that added the lint and noticed something that might have been of interest. |
Alright then 👍 I'll reclaim |
Make sure we don't deny macro vars w keyword names `$async:ident`, etc are all valid. Fixes rust-lang#124862
Rollup merge of rust-lang#124869 - compiler-errors:keyword, r=Nilstrieb Make sure we don't deny macro vars w keyword names `$async:ident`, etc are all valid. Fixes rust-lang#124862
results in a warning
The suggested code does compile (to my surprise), but the warning is a false positive. Switching the edition to 2024 results in a successful compilation as written. This is consistent with all other keywords that can be used as matchers, so I can't imagine this isn't intended behavior.
rustc info:
The text was updated successfully, but these errors were encountered: