Skip to content

Lint pass to warn about catchall cases #3482

Closed
@catamorphism

Description

@catamorphism

#3481 arose because kind::check_expr had an _ case in its match, so when expr_struct got added as a case, the _ case covered it, which is not what was intended. A lint pass to warn about _ cases would be good. It could be less annoying if it only complained about a _ where the scrutinee has an enum type and the _ might match two or more different variants.

Since whether to use _s is a matter of taste, this should be off by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions