Skip to content

non_upper_case_globals lint detects no_mangle items #21045

@usamoi

Description

@usamoi

rust-analyzer version: rust-analyzer version: 0.4.2682-standalone [/home/usamoi/.vscode/extensions/rust-lang.rust-analyzer-0.4.2682-linux-x64/server/rust-analyzer]

rustc version: rustc 1.91.1 (ed61e7d7e 2025-11-07)

editor or extension: VSCode, 0.4.2682

code snippet to reproduce:

#[unsafe(no_mangle)]
pub static lower_case: i32 = 1;

cargo check shows no warnings, while rust-analyzer complains non_upper_case_globals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsdiagnostics / error reportingC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions