Skip to content

Lint for useless tuple binding. #2852

Open
@cedws

Description

@cedws
fn main() {
    let a = 1;
    
    match (a, 2) {
        (a, 2) => {},
        _ => {},
    }
}

The match (a, 2) can be reduced to just match 2, and the (a, 2) => {} can be reduced to 2 => {}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions