Skip to content

#[expect(non_snake_case)] is ignored in on-the-fly diagnostics #18056

@TDplai

Description

@TDplai

rust-analyzer version: rust-analyzer 1.83.0-nightly (4ac7bcb 2024-09-04)

rustc version: rustc 1.83.0-nightly (4ac7bcbaa 2024-09-04)

editor or extension: Neovim v0.10.1

relevant settings: RUSTUP_HOME=~/.local/share/rustup, CARGO_HOME=~/.local/share/cargo

code snippet to reproduce:

#[expect(non_snake_case)]
fn main() {
    let _FOO = 0;
}

I don't think this is #6541, because replacing expect with allow silences the warning.

expect correctly silences the warning given on saving the file, but does not silence the on-the-fly diagnostics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions