Skip to content

shadowed label false positive in closure #31754

Closed
@durka

Description

@durka

It seems that #27093 did not fully fix #25343. The following code reports a spurious warning on 'b:

'a: loop { break; }
'b: loop { break; }

// no warning
fn does_not_shadow() {
    'a: loop {}
}

// false positive
let also_does_not_shadow = || {
    'b: loop {}
};

Stable, beta, nightly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions