Skip to content

lint for matches with a single case #12447

Closed

Description

@thestinger

Some of these are still around from when let patterns were totally broken. It'd also be nice from a pedagogical perspective.

Activity

  1. alexcrichton commented on Feb 21, 2014

    @alexcrichton
    Member

    This may be a little difficult because match is still semantically a little different than let. I've found a number of match statements that can become let, but for example all the new formatting code uses a single-case match instead of a let for lifetime reasons.

  2. steveklabnik commented on Apr 28, 2015

    @steveklabnik
    Contributor

    Traige: this lint still does not exist.

  3. steveklabnik commented on Feb 11, 2016

    @steveklabnik
    Contributor

    Since new lints have a big impact on users of rustc, the policy is that they should go through the RFC process like other user-facing changes. As such, I'm going to give this one a close, but if anyone comes across this ticket and wants this lint, consider adding it to clippy and/or writing up an RFC. Thanks!

  4. added a commit that references this issue on Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions