Skip to content
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

Fix warning for unused variables in or pattern (issue #67691) #67766

Merged
merged 4 commits into from
Apr 13, 2020

Conversation

sapir
Copy link
Contributor

@sapir sapir commented Jan 1, 2020

Is this a good way to fix it?

Also, the tests fail, the "fixed" code output says { i, j } instead of { i, j: _ }, how can I fix that?

@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 1, 2020
@Centril Centril added the F-or_patterns `#![feature(or_patterns)]` label Jan 1, 2020
@Centril
Copy link
Contributor

Centril commented Jan 1, 2020

r? @matthewjasper

@rust-highfive rust-highfive assigned matthewjasper and unassigned eddyb Jan 1, 2020
@rust-highfive

This comment has been minimized.

@sapir sapir force-pushed the fix-unused-in-or-pattern-warning branch from 2ac7d33 to b88baa1 Compare January 3, 2020 11:36
@sapir
Copy link
Contributor Author

sapir commented Jan 3, 2020

Why aren't the ref keywords being included in the suggestion? The test for #54180 is passing, and afaict the span being passed to multipart_suggestion does include the ref keyword.

@rust-highfive

This comment has been minimized.

@Centril Centril added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 6, 2020
@bors

This comment has been minimized.

@Centril Centril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Feb 5, 2020
@Centril

This comment has been minimized.

@Centril

This comment has been minimized.

@sapir

This comment has been minimized.

@sapir sapir force-pushed the fix-unused-in-or-pattern-warning branch 2 times, most recently from c9d7166 to 5f48ad5 Compare February 21, 2020 14:49
@rust-highfive

This comment has been minimized.

@sapir sapir force-pushed the fix-unused-in-or-pattern-warning branch from 5f48ad5 to 44489cf Compare March 6, 2020 08:12
@rust-highfive

This comment has been minimized.

@sapir sapir force-pushed the fix-unused-in-or-pattern-warning branch from 44489cf to d43f3d6 Compare March 7, 2020 20:38
@sapir

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@joelpalmer
Copy link

Ping from Triage: Any updates @sapir?

@bors

This comment has been minimized.

@sapir
Copy link
Contributor Author

sapir commented Mar 24, 2020

@joelpalmer I don't know what I should do about the multipart suggestions?

@matthewjasper
Copy link
Contributor

multipart_suggestion is correct. You;ll have to remove run-rustfix from the test and leave a FIXME.

@joelpalmer joelpalmer added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 6, 2020
@joelpalmer

This comment has been minimized.

@sapir sapir force-pushed the fix-unused-in-or-pattern-warning branch from 8d736dd to 3221638 Compare April 10, 2020 02:53
@sapir
Copy link
Contributor Author

sapir commented Apr 12, 2020

@joelpalmer I did as @matthewjasper suggested regarding multipart_suggestions, so the tests pass now. Also I rebased to current master and fixed some conflicts.

@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 12, 2020

📌 Commit 3221638 has been approved by matthewjasper

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 12, 2020
@bors

This comment has been minimized.

@Dylan-DPC-zz

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 12, 2020
Rollup of 4 pull requests

Successful merges:

 - rust-lang#67766 (Fix warning for unused variables in or pattern (issue rust-lang#67691))
 - rust-lang#71013 (Pass the `PlaceElem::Index` local to `visit_local`)
 - rust-lang#71064 (fix issue 69130)
 - rust-lang#71069 (Remove some usage of `DUMMY_HIR_ID`)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 13, 2020
@bors bors merged commit 6947dec into rust-lang:master Apr 13, 2020
@sapir sapir deleted the fix-unused-in-or-pattern-warning branch April 13, 2020 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-or_patterns `#![feature(or_patterns)]` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants