Skip to content

Useless semicolons #3305

Closed
Closed
@leonardo-m

Description

@leonardo-m

I suggest to give some kind of warning or hint to remove the double ;; here:

fn main() {
    println!("hello");;
}

The D language is different from Rust so the situation isn't directly comparable, but in a case like this gives a warning like this:

temp.d(2,22): Warning: use '{ }' for an empty statement, not a ';'

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesL-unnecessaryLint: Warn about unnecessary code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions