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 hidden variant suggestion on single variant #6988

Merged
merged 1 commit into from Apr 2, 2021
Merged

Fix hidden variant suggestion on single variant #6988

merged 1 commit into from Apr 2, 2021

Conversation

ghost
Copy link

@ghost ghost commented Mar 27, 2021

Fixes #6984

changelog: Fix hidden variant suggestion on match_wildcard_for_single_variants

@rust-highfive
Copy link

r? @camsteffen

(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 Mar 27, 2021
@ghost
Copy link
Author

ghost commented Mar 27, 2021

clippy::wildcard_enum_match_arm has the same problem. A better approach might be to filter the hidden variants out of the missing variant list.

Feel free to reject this pull request in favor of a more comprehensive one.

Copy link
Contributor

@camsteffen camsteffen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix looks good but one comment.

clippy_lints/src/matches.rs Show resolved Hide resolved
@camsteffen
Copy link
Contributor

Looks good. Please squash your commits.

@camsteffen
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 2, 2021

📌 Commit 8abab55 has been approved by camsteffen

@bors
Copy link
Collaborator

bors commented Apr 2, 2021

⌛ Testing commit 8abab55 with merge ea558f8...

bors added a commit that referenced this pull request Apr 2, 2021
Fix hidden variant suggestion on single variant

Fixes #6984

changelog: Fix hidden variant suggestion on `match_wildcard_for_single_variants`
@bors
Copy link
Collaborator

bors commented Apr 2, 2021

💥 Test timed out

@camsteffen
Copy link
Contributor

@bors retry

@bors
Copy link
Collaborator

bors commented Apr 2, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: camsteffen
Pushing 1931db2 to master...

@bors bors merged commit 1931db2 into rust-lang:master Apr 2, 2021
@ghost ghost deleted the fix-6984 branch May 28, 2021 05:41
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.

False positive match_wildcard_for_single_variants on enum with hidden variant
3 participants