Skip to content

Incorrect shadowed label warnings #29095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
withoutboats opened this issue Oct 16, 2015 · 1 comment
Closed

Incorrect shadowed label warnings #29095

withoutboats opened this issue Oct 16, 2015 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@withoutboats
Copy link
Contributor

This may be a byproduct of not having non-lexical lifetimes, but this code generates a bunch of shadowed label warnings that are not accurate (control is not within the block of the allegedly shadowed label at the point the new label is declared):

    match 0 {
        0 => {
            'quux: loop {
                break 'quux;
            }
        }
        1 => {
            'quux: loop {
                break 'quux;
            }
        }
        _ => {
            'quux: loop {
                break 'quux;
            }
        }
    }

http://is.gd/2yMtC8

As far as I can tell, this warning cannot be turned off (this seems like a bug also).

@alexcrichton alexcrichton added the A-diagnostics Area: Messages for errors, warnings, and lints label Oct 16, 2015
@petrochenkov
Copy link
Contributor

Duplicate of #24278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

3 participants