Skip to content

#![allow(non_upper_case_globals)] not working correctly in proc macros #15344

Open
@sunmy2019

Description

@sunmy2019

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 and cargo check works without any warnings.

image

image

I tried the built-in macro expand. That line does exist.

image

If I copied that expansion to the source code directly, everything works fine.

image

It looks like the allow implementation is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsdiagnostics / error reportingA-macromacro expansionC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions