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

Lint [single_match] on Option matches #8985

Merged
merged 7 commits into from
Jun 25, 2022

Conversation

botahamec
Copy link
Contributor

@botahamec botahamec commented Jun 10, 2022

fixes #8928

changelog: did some cleanup of the logic for [`single_match`] and [`single_match_else`] which fixes the bug where Option matches were not linted unless a wildcard was used for one of the arms.

@rust-highfive
Copy link

r? @llogiq

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 10, 2022
@botahamec botahamec changed the title Single match option Lint [single_match] on Option matches Jun 10, 2022
@llogiq
Copy link
Contributor

llogiq commented Jun 25, 2022

Thank you! @bors r+

@bors
Copy link
Contributor

bors commented Jun 25, 2022

📌 Commit ded2bb5 has been approved by llogiq

@bors
Copy link
Contributor

bors commented Jun 25, 2022

⌛ Testing commit ded2bb5 with merge 8789f4e...

@bors
Copy link
Contributor

bors commented Jun 25, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 8789f4e to master...

@bors bors merged commit 8789f4e into rust-lang:master Jun 25, 2022
@botahamec botahamec deleted the single-match-option branch June 25, 2022 17:12
ongardie added a commit to ongardie/cubicle that referenced this pull request Sep 23, 2022
This got stricter for `Option` after
<rust-lang/rust-clippy#8985>, where I don't think it
improves readability.
snev68 added a commit to snev68/cubicle that referenced this pull request Aug 5, 2024
This got stricter for `Option` after
<rust-lang/rust-clippy#8985>, where I don't think it
improves readability.
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.

single_match should lint exhaustive match on standard types
4 participants