Skip to content

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

Merged
merged 2 commits into from
Dec 18, 2015

Conversation

durka
Copy link
Contributor

@durka durka commented Dec 14, 2015

Fixes #30371.

@rust-highfive
Copy link
Contributor

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+ 131aefe482e858c8b94079b0f9963714492c755a

@mitaa
Copy link
Contributor

mitaa commented Dec 14, 2015

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),
         } {
     }

@durka
Copy link
Contributor Author

durka commented Dec 14, 2015

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.

@durka
Copy link
Contributor Author

durka commented Dec 14, 2015

How can I run the pretty test locally? I guess it's not part of make tidy.

@durka
Copy link
Contributor Author

durka commented Dec 14, 2015

Also, I found a smaller test case:

fn main() {
    for _ in { panic!(); Some(()) } {}
}

Should I replace the test with that, or include both?

@durka
Copy link
Contributor Author

durka commented Dec 15, 2015

\o/

@sanxiyn
Copy link
Member

sanxiyn commented Dec 16, 2015

FYI: you can use make check-pretty to run pretty tests.

@Manishearth
Copy link
Member

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Dec 18, 2015

📌 Commit e0a5260 has been approved by alexcrichton

bors added a commit that referenced this pull request Dec 18, 2015
@bors
Copy link
Collaborator

bors commented Dec 18, 2015

⌛ Testing commit e0a5260 with merge 29ea4ee...

@bors bors merged commit e0a5260 into rust-lang:master Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants