Skip to content

"Remove this semicolon" lint for return values and closures #18595

Closed
@alexcrichton

Description

@alexcrichton

Right now it looks like we don't handle closures when printing out the "consider removing this semicolon" help message (but we do handle functions!). It'd be kinda cool if we could handle closures as well (or maybe any block statement in general?

fn foo(_: || -> bool) {}

fn main() {
    foo(|| { true; });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions