-
Notifications
You must be signed in to change notification settings - Fork 1.7k
#![allow(non_upper_case_globals)] not working correctly in proc macros #15344
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
I suspect changes in #15320 exposed this bug. |
I'd say this is a duplicate of #6541, but we may want to suppress the warning that originates in macro expansions. |
I tried to ignore diagnostics from proc macros in #14990 since rustc ignores them (rustc doesn't ignore all of them, but I didn't find out what rustc exactly does). @sunmy2019 Can you try to see if it happens in that commit as well? |
I don't get it. v0.3.1599 contains that commit 45272ef already. |
I want to see if it worked then originally and regressed later, or it didn't work even then. |
I can confirm that rust-analyzer 0.3.1591-standalone is working as expected. |
Howdy. Is there a known work-around to this issue? Thanks. |
I added a global |
@Veykril it seems like your fix may have only corrected derive macros, I am still hitting this error with functionlike macros. Should this issue remain open, or does that seem incorrect? Using v0.3.1673 |
rust-analyzer version: rust-analyzer version: 0.3.1599-standalone
rustc version: rustc 1.68.2 (9eb3afe9e 2023-03-27)
relevant settings:
num_enum == 0.6.1
It is erroneously diagnosing it as nonupper case globals.
cargo build
andcargo check
works without any warnings.I tried the built-in macro expand. That line does exist.
If I copied that expansion to the source code directly, everything works fine.
It looks like the
allow
implementation is wrong.The text was updated successfully, but these errors were encountered: