1 error: this `if` has identical blocks
2 --> $DIR/copies.rs:41:10
4 41 | else { //~ ERROR same body as `if` block
6 42 | | Foo { bar: 42 };
14 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
16 --> $DIR/copies.rs:32:13
20 33 | | Foo { bar: 42 };
28 error: this `match` has identical arm bodies
29 --> $DIR/copies.rs:90:14
31 90 | _ => { //~ ERROR match arms have same body
34 92 | | let mut a = 42 + [23].len() as i32;
41 = note: `-D clippy::match-same-arms` implied by `-D warnings`
43 --> $DIR/copies.rs:81:15
48 83 | | let mut a = 42 + [23].len() as i32;
54 note: `42` has the same arm body as the `_` wildcard, consider removing it`
55 --> $DIR/copies.rs:81:15
60 83 | | let mut a = 42 + [23].len() as i32;
67 error: this `match` has identical arm bodies
68 --> $DIR/copies.rs:104:14
70 104 | _ => 0, //~ ERROR match arms have same body
74 --> $DIR/copies.rs:102:19
78 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
79 --> $DIR/copies.rs:102:19
84 error: this `if` has identical blocks
85 --> $DIR/copies.rs:114:10
87 114 | else { //~ ERROR same body as `if` block
94 --> $DIR/copies.rs:111:21
96 111 | let _ = if true {
97 | _____________________^
102 error: this `if` has identical blocks
103 --> $DIR/copies.rs:128:10
105 128 | else { //~ ERROR same body as `if` block
107 129 | | for _ in &[42] {
108 130 | | let foo: &Option<_> = &Some::<u8>(42);
116 --> $DIR/copies.rs:118:13
120 119 | | for _ in &[42] {
121 120 | | let foo: &Option<_> = &Some::<u8>(42);
128 error: this `if` has identical blocks
129 --> $DIR/copies.rs:150:10
131 150 | else { //~ ERROR same body as `if` block
133 151 | | let bar = if true {
142 --> $DIR/copies.rs:139:13
146 140 | | let bar = if true {
154 error: this `if` has identical blocks
155 --> $DIR/copies.rs:185:10
157 185 | else { //~ ERROR same body as `if` block
159 186 | | if let Some(a) = Some(42) {}
164 --> $DIR/copies.rs:182:13
168 183 | | if let Some(a) = Some(42) {}
172 error: this `if` has identical blocks
173 --> $DIR/copies.rs:192:10
175 192 | else { //~ ERROR same body as `if` block
177 193 | | if let (1, .., 3) = (1, 2, 3) {}
182 --> $DIR/copies.rs:189:13
186 190 | | if let (1, .., 3) = (1, 2, 3) {}
190 error: this `match` has identical arm bodies
191 --> $DIR/copies.rs:247:15
193 247 | 51 => foo(), //~ ERROR match arms have same body
197 --> $DIR/copies.rs:246:15
201 note: consider refactoring into `42 | 51`
202 --> $DIR/copies.rs:246:15
207 error: this `match` has identical arm bodies
208 --> $DIR/copies.rs:253:17
210 253 | None => 24, //~ ERROR match arms have same body
214 --> $DIR/copies.rs:252:20
218 note: consider refactoring into `Some(_) | None`
219 --> $DIR/copies.rs:252:20
224 error: this `match` has identical arm bodies
225 --> $DIR/copies.rs:275:28
227 275 | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
231 --> $DIR/copies.rs:274:28
233 274 | (Some(a), None) => bar(a),
235 note: consider refactoring into `(Some(a), None) | (None, Some(a))`
236 --> $DIR/copies.rs:274:28
238 274 | (Some(a), None) => bar(a),
241 error: this `match` has identical arm bodies
242 --> $DIR/copies.rs:281:26
244 281 | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
248 --> $DIR/copies.rs:280:26
250 280 | (Some(a), ..) => bar(a),
252 note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
253 --> $DIR/copies.rs:280:26
255 280 | (Some(a), ..) => bar(a),
258 error: this `match` has identical arm bodies
259 --> $DIR/copies.rs:287:20
261 287 | (.., 3) => 42, //~ ERROR match arms have same body
265 --> $DIR/copies.rs:286:23
267 286 | (1, .., 3) => 42,
269 note: consider refactoring into `(1, .., 3) | (.., 3)`
270 --> $DIR/copies.rs:286:23
272 286 | (1, .., 3) => 42,
275 error: this `if` has identical blocks
276 --> $DIR/copies.rs:293:12
278 293 | } else { //~ ERROR same body as `if` block
285 --> $DIR/copies.rs:291:21
287 291 | let _ = if true {
288 | _____________________^
290 293 | | } else { //~ ERROR same body as `if` block
293 error: this `if` has identical blocks
294 --> $DIR/copies.rs:299:12
296 299 | } else { //~ ERROR same body as `if` block
303 --> $DIR/copies.rs:297:21
305 297 | let _ = if true {
306 | _____________________^
308 299 | | } else { //~ ERROR same body as `if` block
311 error: this `if` has identical blocks
312 --> $DIR/copies.rs:319:12
314 319 | } else { //~ ERROR same body as `if` block
316 320 | | std::f32::NAN
321 --> $DIR/copies.rs:317:21
323 317 | let _ = if true {
324 | _____________________^
325 318 | | std::f32::NAN
326 319 | | } else { //~ ERROR same body as `if` block
329 error: this `if` has identical blocks
330 --> $DIR/copies.rs:337:10
332 337 | else { //~ ERROR same body as `if` block
334 338 | | try!(Ok("foo"));
339 --> $DIR/copies.rs:334:13
343 335 | | try!(Ok("foo"));
347 error: this `if` has the same condition as a previous if
348 --> $DIR/copies.rs:363:13
350 363 | else if b { //~ ERROR ifs same condition
353 = note: `-D clippy::ifs-same-cond` implied by `-D warnings`
355 --> $DIR/copies.rs:361:8
360 error: this `if` has the same condition as a previous if
361 --> $DIR/copies.rs:368:13
363 368 | else if a == 1 { //~ ERROR ifs same condition
367 --> $DIR/copies.rs:366:8
372 error: this `if` has the same condition as a previous if
373 --> $DIR/copies.rs:375:13
375 375 | else if 2*a == 1 { //~ ERROR ifs same condition
379 --> $DIR/copies.rs:371:8
384 error: aborting due to 20 previous errors