-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
shadowed label false positive in closure #31754
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
steveklabnik
added
the
A-diagnostics
Area: Messages for errors, warnings, and lints
label
Mar 11, 2016
birkenfeld
added a commit
to birkenfeld/rust
that referenced
this issue
May 2, 2016
This should fix rust-lang#31754 and follow-up rust-lang#25343. Before the latter, the closure was visited twice in the context of the enclosing fn, which made even a single closure with a loop label emit a warning. With this change, the closure is still visited within the context of the main fn (which is intended, since it is not a separate item) but resets the found loop labels while being visited. Fixes: rust-lang#31754
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
May 10, 2016
middle: reset loop labels while visiting closure This should fix rust-lang#31754 and follow-up rust-lang#25343. Before the latter, the closure was visited twice in the context of the enclosing fn, which made even a single closure with a loop label emit a warning. With this change, the closure is still visited within the context of the main fn (which is intended, since it is not a separate item) but resets the found loop labels while being visited. Fixes: rust-lang#31754 Note: I amended the test file from rust-lang#25343, but I don't know if the original or amended test are effective, since as far as I could see, compiletest's run-pass tests do not check for zero warnings emitted? /cc @Manishearth
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
May 10, 2016
middle: reset loop labels while visiting closure This should fix rust-lang#31754 and follow-up rust-lang#25343. Before the latter, the closure was visited twice in the context of the enclosing fn, which made even a single closure with a loop label emit a warning. With this change, the closure is still visited within the context of the main fn (which is intended, since it is not a separate item) but resets the found loop labels while being visited. Fixes: rust-lang#31754 Note: I amended the test file from rust-lang#25343, but I don't know if the original or amended test are effective, since as far as I could see, compiletest's run-pass tests do not check for zero warnings emitted? /cc @Manishearth
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
May 11, 2016
middle: reset loop labels while visiting closure This should fix rust-lang#31754 and follow-up rust-lang#25343. Before the latter, the closure was visited twice in the context of the enclosing fn, which made even a single closure with a loop label emit a warning. With this change, the closure is still visited within the context of the main fn (which is intended, since it is not a separate item) but resets the found loop labels while being visited. Fixes: rust-lang#31754 Note: I amended the test file from rust-lang#25343, but I don't know if the original or amended test are effective, since as far as I could see, compiletest's run-pass tests do not check for zero warnings emitted? /cc @Manishearth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that #27093 did not fully fix #25343. The following code reports a spurious warning on
'b
:Stable, beta, nightly.
The text was updated successfully, but these errors were encountered: