|
1 |
| -error: this `match` has identical arm bodies |
2 |
| - --> $DIR/match_same_arms.rs:37:14 |
3 |
| - | |
4 |
| -LL | _ => { |
5 |
| - | ______________^ |
6 |
| -LL | | //~ ERROR match arms have same body |
7 |
| -LL | | foo(); |
8 |
| -LL | | let mut a = 42 + [23].len() as i32; |
9 |
| -... | |
10 |
| -LL | | a |
11 |
| -LL | | }, |
12 |
| - | |_________^ |
13 |
| - | |
14 |
| - = note: `-D clippy::match-same-arms` implied by `-D warnings` |
15 |
| -note: same as this |
16 |
| - --> $DIR/match_same_arms.rs:28:15 |
17 |
| - | |
18 |
| -LL | 42 => { |
19 |
| - | _______________^ |
20 |
| -LL | | foo(); |
21 |
| -LL | | let mut a = 42 + [23].len() as i32; |
22 |
| -LL | | if true { |
23 |
| -... | |
24 |
| -LL | | a |
25 |
| -LL | | }, |
26 |
| - | |_________^ |
27 |
| -note: `42` has the same arm body as the `_` wildcard, consider removing it` |
28 |
| - --> $DIR/match_same_arms.rs:28:15 |
29 |
| - | |
30 |
| -LL | 42 => { |
31 |
| - | _______________^ |
32 |
| -LL | | foo(); |
33 |
| -LL | | let mut a = 42 + [23].len() as i32; |
34 |
| -LL | | if true { |
35 |
| -... | |
36 |
| -LL | | a |
37 |
| -LL | | }, |
38 |
| - | |_________^ |
39 |
| - |
40 | 1 | error: this `match` has identical arm bodies
|
41 | 2 | --> $DIR/match_same_arms.rs:52:14
|
42 | 3 | |
|
43 | 4 | LL | _ => 0, //~ ERROR match arms have same body
|
44 | 5 | | ^
|
45 | 6 | |
|
| 7 | + = note: `-D clippy::match-same-arms` implied by `-D warnings` |
46 | 8 | note: same as this
|
47 | 9 | --> $DIR/match_same_arms.rs:50:19
|
48 | 10 | |
|
@@ -139,5 +101,39 @@ note: consider refactoring into `(1, .., 3) | (.., 3)`
|
139 | 101 | LL | (1, .., 3) => 42,
|
140 | 102 | | ^^
|
141 | 103 |
|
142 |
| -error: aborting due to 7 previous errors |
| 104 | +error: this `match` has identical arm bodies |
| 105 | + --> $DIR/match_same_arms.rs:114:15 |
| 106 | + | |
| 107 | +LL | 51 => 1, //~ ERROR match arms have same body |
| 108 | + | ^ |
| 109 | + | |
| 110 | +note: same as this |
| 111 | + --> $DIR/match_same_arms.rs:113:15 |
| 112 | + | |
| 113 | +LL | 42 => 1, |
| 114 | + | ^ |
| 115 | +note: consider refactoring into `42 | 51` |
| 116 | + --> $DIR/match_same_arms.rs:113:15 |
| 117 | + | |
| 118 | +LL | 42 => 1, |
| 119 | + | ^ |
| 120 | + |
| 121 | +error: this `match` has identical arm bodies |
| 122 | + --> $DIR/match_same_arms.rs:116:15 |
| 123 | + | |
| 124 | +LL | 52 => 2, //~ ERROR match arms have same body |
| 125 | + | ^ |
| 126 | + | |
| 127 | +note: same as this |
| 128 | + --> $DIR/match_same_arms.rs:115:15 |
| 129 | + | |
| 130 | +LL | 41 => 2, |
| 131 | + | ^ |
| 132 | +note: consider refactoring into `41 | 52` |
| 133 | + --> $DIR/match_same_arms.rs:115:15 |
| 134 | + | |
| 135 | +LL | 41 => 2, |
| 136 | + | ^ |
| 137 | + |
| 138 | +error: aborting due to 8 previous errors |
143 | 139 |
|
0 commit comments