Skip to content

When lint attributes in the same scope overlap, all but the last declared one are dropped #53079

Closed
@FaultyRAM

Description

@FaultyRAM
#![forbid(warnings)]
#![allow(dead_code)]

struct Foo;

fn main() {}

Playground link

The above code should fail to compile with an error about trying to allow a forbidden lint, but successfully builds without any warnings. Tested on latest stable/beta/nightly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions