Skip to content

Name shadowing within a single pattern should have a lint (or be an error) #14581

Closed
@huonw

Description

@huonw

E.g.

let (a, a) = (1, 2);

is perfectly valid code, but it seems very useless and one would only do it by accident, i.e. we could lint it.

(That said, I imagine almost all examples of this will hit the "unused variable" warning too.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions