1 error: this `match` has identical arm bodies
2 --> $DIR/match_same_arms.rs:37:14
6 LL | | //~ ERROR match arms have same body
8 LL | | let mut a = 42 + [23].len() as i32;
14 = note: `-D clippy::match-same-arms` implied by `-D warnings`
16 --> $DIR/match_same_arms.rs:28:15
21 LL | | let mut a = 42 + [23].len() as i32;
27 note: `42` has the same arm body as the `_` wildcard, consider removing it`
28 --> $DIR/match_same_arms.rs:28:15
33 LL | | let mut a = 42 + [23].len() as i32;
40 error: this `match` has identical arm bodies
41 --> $DIR/match_same_arms.rs:52:14
43 LL | _ => 0, //~ ERROR match arms have same body
47 --> $DIR/match_same_arms.rs:50:19
51 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
52 --> $DIR/match_same_arms.rs:50:19
57 error: this `match` has identical arm bodies
58 --> $DIR/match_same_arms.rs:57:15
60 LL | 51 => foo(), //~ ERROR match arms have same body
64 --> $DIR/match_same_arms.rs:56:15
68 help: consider refactoring into `42 | 51`
69 --> $DIR/match_same_arms.rs:56:9
74 error: this `match` has identical arm bodies
75 --> $DIR/match_same_arms.rs:63:17
77 LL | None => 24, //~ ERROR match arms have same body
81 --> $DIR/match_same_arms.rs:62:20
85 help: consider refactoring into `Some(_) | None`
86 --> $DIR/match_same_arms.rs:62:9
91 error: this `match` has identical arm bodies
92 --> $DIR/match_same_arms.rs:85:28
94 LL | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
98 --> $DIR/match_same_arms.rs:84:28
100 LL | (Some(a), None) => bar(a),
102 help: consider refactoring into `(Some(a), None) | (None, Some(a))`
103 --> $DIR/match_same_arms.rs:84:9
105 LL | (Some(a), None) => bar(a),
108 error: this `match` has identical arm bodies
109 --> $DIR/match_same_arms.rs:91:26
111 LL | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
115 --> $DIR/match_same_arms.rs:90:26
117 LL | (Some(a), ..) => bar(a),
119 help: consider refactoring into `(Some(a), ..) | (.., Some(a))`
120 --> $DIR/match_same_arms.rs:90:9
122 LL | (Some(a), ..) => bar(a),
125 error: this `match` has identical arm bodies
126 --> $DIR/match_same_arms.rs:97:20
128 LL | (.., 3) => 42, //~ ERROR match arms have same body
132 --> $DIR/match_same_arms.rs:96:23
134 LL | (1, .., 3) => 42,
136 help: consider refactoring into `(1, .., 3) | (.., 3)`
137 --> $DIR/match_same_arms.rs:96:9
139 LL | (1, .., 3) => 42,
142 error: this `match` has identical arm bodies
143 --> $DIR/match_same_arms.rs:114:15
145 LL | 51 => 1, //~ ERROR match arms have same body
149 --> $DIR/match_same_arms.rs:113:15
153 help: consider refactoring into `42 | 51`
154 --> $DIR/match_same_arms.rs:113:9
159 error: this `match` has identical arm bodies
160 --> $DIR/match_same_arms.rs:116:15
162 LL | 52 => 2, //~ ERROR match arms have same body
166 --> $DIR/match_same_arms.rs:115:15
170 help: consider refactoring into `41 | 52`
171 --> $DIR/match_same_arms.rs:115:9
176 error: this `match` has identical arm bodies
177 --> $DIR/match_same_arms.rs:122:14
179 LL | 2 => 2, //~ ERROR 2nd matched arms have same body
183 --> $DIR/match_same_arms.rs:121:14
187 help: consider refactoring into `1 | 2`
188 --> $DIR/match_same_arms.rs:121:9
193 error: this `match` has identical arm bodies
194 --> $DIR/match_same_arms.rs:123:14
196 LL | 3 => 2, //~ ERROR 3rd matched arms have same body
200 --> $DIR/match_same_arms.rs:121:14
204 help: consider refactoring into `1 | 3`
205 --> $DIR/match_same_arms.rs:121:9
210 error: this `match` has identical arm bodies
211 --> $DIR/match_same_arms.rs:123:14
213 LL | 3 => 2, //~ ERROR 3rd matched arms have same body
217 --> $DIR/match_same_arms.rs:122:14
219 LL | 2 => 2, //~ ERROR 2nd matched arms have same body
221 help: consider refactoring into `2 | 3`
222 --> $DIR/match_same_arms.rs:122:9
224 LL | 2 => 2, //~ ERROR 2nd matched arms have same body
227 error: aborting due to 12 previous errors