-
Notifications
You must be signed in to change notification settings - Fork 13.4k
evade unused_variables lint in for-loop desugaring #30374
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
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ 131aefe482e858c8b94079b0f9963714492c755a |
Pretty failure: @@ -13,8 +13,7 @@
fn main() {
for _ in
match return () {
-
- // should not have a warning here
+ // should not have a warning here
() => Some(0),
} {
} |
Ugh. But that's not where the warning is. Should I remove that comment or move it to the line before the match? I'm also going to fix the comment in lowering.rs which I made stale. |
How can I run the pretty test locally? I guess it's not part of |
Also, I found a smaller test case: fn main() {
for _ in { panic!(); Some(()) } {}
} Should I replace the test with that, or include both? |
\o/ |
FYI: you can use |
@bors r=alexcrichton |
📌 Commit e0a5260 has been approved by |
Fixes #30371.