Skip to content

unused_parens never checks expressions behind references #70084

Open
@lcnr

Description

@lcnr
fn main() {
    let _ = &(5);
    // This does not warn
}

playground

@rustbot modify labels: +T-compiler

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.L-false-negativeLint: False negative (should have fired but didn't).L-unused_parensLint: unused_parensT-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