Fix collapsible_match suggests wrongly when match body has no braces#16749
Fix collapsible_match suggests wrongly when match body has no braces#16749profetia wants to merge 1 commit intorust-lang:masterfrom
collapsible_match suggests wrongly when match body has no braces#16749Conversation
|
rustbot has assigned @samueltardieu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
No changes for 691fbb4 |
|
Also fixes #16716 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
r? clippy |
|
I think #16749 has some merit and is a better test (all following alternatives in a match are wildcards). |
|
Do you mean #16878? |
Yes |
|
Closed in favor of #16878 |
|
Reopened to fix #16716 solely |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
collapsible_match FP when the scrutinee could match a later patterncollapsible_match suggests wrongly when match body has no braces
|
Also closes #16894 |
There was a problem hiding this comment.
Could you please include the reproduction code of #16894 as a test, as well as a combination of strangely formatted match arms, to ensure none is going to cause an issue?
|
Added. Thank you! |
|
@rustbot ready |
Closes #16716
Closes #16894
changelog: [
collapsible_match] fix wrong suggestions when match body has no braces