Commit 5ccf543
committed
Auto merge of rust-lang#11441 - Jarcho:issue_11365, r=xFrednet
`single_match`: fix checking of explicitly matched enums
fixes rust-lang#11365
This approach has false-negatives, but fixing them will require a significant amount of additional state tracking. The comment in `add_and_pats` has the explanation.
changelog: `single_match`: correct checking if the match explicitly matches all of an enum's variants.File tree
12 files changed
+437
-195
lines changed- clippy_lints/src/matches
- tests
- ui-toml/excessive_nesting
- ui
- crashes
12 files changed
+437
-195
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | | - | |
| 183 | + | |
| 184 | + | |
186 | 185 | | |
187 | 186 | | |
188 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
42 | 41 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
0 commit comments