Skip to content

Avoid match_wildcard_for_single_variants on guarded wild matches #10056

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 22, 2022

Conversation

koka831
Copy link
Contributor

@koka831 koka831 commented Dec 10, 2022

fix #9993

changelog: FP: [match_wildcard_for_single_variants]: No longer lints on wildcards with a guard
#10056

r? @Jarcho

fix rust-lang#9993
changlog: [`match_wildcard_for_single_variants`] avoid suggestion on wildcard with guard
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 10, 2022
@Jarcho
Copy link
Contributor

Jarcho commented Dec 11, 2022

Can you include a test that includes both a guarded wildcard and a regular wildcard? Otherwise this looks good.

@koka831
Copy link
Contributor Author

koka831 commented Dec 11, 2022

Added it (09839a5).

@Jarcho
Copy link
Contributor

Jarcho commented Dec 11, 2022

I meant a test like:

match foo {
   _ if cond => (),
   Foo::A => (),
   _ => (),
}

Where the final wild pattern should be linted.

@koka831
Copy link
Contributor Author

koka831 commented Dec 18, 2022

I'm sorry, modified the test case.

@Jarcho
Copy link
Contributor

Jarcho commented Dec 20, 2022

Thank you. @bors r+

@bors
Copy link
Contributor

bors commented Dec 20, 2022

📌 Commit ebb0759 has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Dec 20, 2022

⌛ Testing commit ebb0759 with merge a247a5e...

bors added a commit that referenced this pull request Dec 20, 2022
Avoid `match_wildcard_for_single_variants` on guarded wild matches

fix #9993

changlog: FP: [`match_wildcard_for_single_variants`]: No longer lints on wildcards with a guard
[#10056](#10056)
<!-- changelog_checked -->

r? `@Jarcho`
@bors
Copy link
Contributor

bors commented Dec 20, 2022

💔 Test failed - checks-action_test

@koka831
Copy link
Contributor Author

koka831 commented Dec 20, 2022

@Jarcho sorry I realized I've made a typo in PR, changlog and now fixed them.
Could you run it again?

@Jarcho
Copy link
Contributor

Jarcho commented Dec 22, 2022

@bors retry

@bors
Copy link
Contributor

bors commented Dec 22, 2022

⌛ Testing commit ebb0759 with merge 8a6e6fd...

@bors
Copy link
Contributor

bors commented Dec 22, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing 8a6e6fd to master...

@bors bors merged commit 8a6e6fd into rust-lang:master Dec 22, 2022
@koka831 koka831 deleted the fix/9993 branch December 22, 2022 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

match_wildcard_for_single_variants triggers on guarded wild matches
4 participants