Skip to content

Warn for extra semicolon #56338

Closed
Closed
@leonardo-m

Description

@leonardo-m

The closing semicolon of the match {} is not warned against by Rusts nor Clippy:

enum Foo { A, B }

fn bar(f: Foo) {
    match f {
        Foo::A => {},
        Foo::B => {},
    };
}

fn main() {
    bar(Foo::A);
    bar(Foo::B);
}

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