Skip to content

Allowing a lint fails on let binding. #51942

Description

@vi

Example with cost_err:

fn main() {
    #[allow(const_err)]
    let _x = 42 / 0;
}
#[allow(const_err)]
fn main() {
    let _x = 42 / 0;
}

Expected: the same. Actual: warning in the first case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)A-diagnosticsArea: Messages for errors, warnings, and lintsC-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