Skip to content

unused_parens doesn't fire for trailing return expression #68386

Closed
@varkor

Description

@varkor
fn foo() -> u32 {
    let _ = (5); //~ LINT unnecessary parentheses around assigned value
    (5) // no lint
}

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.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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