1 error: this `if` has identical blocks
2 --> $DIR/copies.rs:31:10
4 31 | else { //~ ERROR same body as `if` block
6 32 | | Foo { bar: 42 };
14 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
16 --> $DIR/copies.rs:22:13
20 23 | | Foo { bar: 42 };
28 error: this `match` has identical arm bodies
29 --> $DIR/copies.rs:80:14
31 80 | _ => { //~ ERROR match arms have same body
34 82 | | let mut a = 42 + [23].len() as i32;
41 = note: `-D clippy::match-same-arms` implied by `-D warnings`
43 --> $DIR/copies.rs:71:15
48 73 | | 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:71:15
60 73 | | let mut a = 42 + [23].len() as i32;
67 error: this `match` has identical arm bodies
68 --> $DIR/copies.rs:94:14
70 94 | _ => 0, //~ ERROR match arms have same body
74 --> $DIR/copies.rs:92:19
78 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
79 --> $DIR/copies.rs:92:19
84 error: this `if` has identical blocks
85 --> $DIR/copies.rs:104:10
87 104 | else { //~ ERROR same body as `if` block
94 --> $DIR/copies.rs:101:21
96 101 | let _ = if true {
97 | _____________________^
102 error: this `if` has identical blocks
103 --> $DIR/copies.rs:118:10
105 118 | else { //~ ERROR same body as `if` block
107 119 | | for _ in &[42] {
108 120 | | let foo: &Option<_> = &Some::<u8>(42);
116 --> $DIR/copies.rs:108:13
120 109 | | for _ in &[42] {
121 110 | | let foo: &Option<_> = &Some::<u8>(42);
128 error: this `if` has identical blocks
129 --> $DIR/copies.rs:140:10
131 140 | else { //~ ERROR same body as `if` block
133 141 | | let bar = if true {
142 --> $DIR/copies.rs:129:13
146 130 | | let bar = if true {
154 error: this `if` has identical blocks
155 --> $DIR/copies.rs:175:10
157 175 | else { //~ ERROR same body as `if` block
159 176 | | if let Some(a) = Some(42) {}
164 --> $DIR/copies.rs:172:13
168 173 | | if let Some(a) = Some(42) {}
172 error: this `if` has identical blocks
173 --> $DIR/copies.rs:182:10
175 182 | else { //~ ERROR same body as `if` block
177 183 | | if let (1, .., 3) = (1, 2, 3) {}
182 --> $DIR/copies.rs:179:13
186 180 | | if let (1, .., 3) = (1, 2, 3) {}
190 error: this `match` has identical arm bodies
191 --> $DIR/copies.rs:237:15
193 237 | 51 => foo(), //~ ERROR match arms have same body
197 --> $DIR/copies.rs:236:15
201 note: consider refactoring into `42 | 51`
202 --> $DIR/copies.rs:236:15
207 error: this `match` has identical arm bodies
208 --> $DIR/copies.rs:243:17
210 243 | None => 24, //~ ERROR match arms have same body
214 --> $DIR/copies.rs:242:20
218 note: consider refactoring into `Some(_) | None`
219 --> $DIR/copies.rs:242:20
224 error: this `match` has identical arm bodies
225 --> $DIR/copies.rs:265:28
227 265 | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
231 --> $DIR/copies.rs:264:28
233 264 | (Some(a), None) => bar(a),
235 note: consider refactoring into `(Some(a), None) | (None, Some(a))`
236 --> $DIR/copies.rs:264:28
238 264 | (Some(a), None) => bar(a),
241 error: this `match` has identical arm bodies
242 --> $DIR/copies.rs:271:26
244 271 | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
248 --> $DIR/copies.rs:270:26
250 270 | (Some(a), ..) => bar(a),
252 note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
253 --> $DIR/copies.rs:270:26
255 270 | (Some(a), ..) => bar(a),
258 error: this `match` has identical arm bodies
259 --> $DIR/copies.rs:277:20
261 277 | (.., 3) => 42, //~ ERROR match arms have same body
265 --> $DIR/copies.rs:276:23
267 276 | (1, .., 3) => 42,
269 note: consider refactoring into `(1, .., 3) | (.., 3)`
270 --> $DIR/copies.rs:276:23
272 276 | (1, .., 3) => 42,
275 error: this `if` has identical blocks
276 --> $DIR/copies.rs:283:12
278 283 | } else { //~ ERROR same body as `if` block
285 --> $DIR/copies.rs:281:21
287 281 | let _ = if true {
288 | _____________________^
290 283 | | } else { //~ ERROR same body as `if` block
293 error: this `if` has identical blocks
294 --> $DIR/copies.rs:289:12
296 289 | } else { //~ ERROR same body as `if` block
303 --> $DIR/copies.rs:287:21
305 287 | let _ = if true {
306 | _____________________^
308 289 | | } else { //~ ERROR same body as `if` block
311 error: this `if` has identical blocks
312 --> $DIR/copies.rs:309:12
314 309 | } else { //~ ERROR same body as `if` block
316 310 | | std::f32::NAN
321 --> $DIR/copies.rs:307:21
323 307 | let _ = if true {
324 | _____________________^
325 308 | | std::f32::NAN
326 309 | | } else { //~ ERROR same body as `if` block
329 error: this `if` has identical blocks
330 --> $DIR/copies.rs:327:10
332 327 | else { //~ ERROR same body as `if` block
334 328 | | try!(Ok("foo"));
339 --> $DIR/copies.rs:324:13
343 325 | | try!(Ok("foo"));
347 error: this `if` has the same condition as a previous if
348 --> $DIR/copies.rs:353:13
350 353 | else if b { //~ ERROR ifs same condition
353 = note: `-D clippy::ifs-same-cond` implied by `-D warnings`
355 --> $DIR/copies.rs:351:8
360 error: this `if` has the same condition as a previous if
361 --> $DIR/copies.rs:358:13
363 358 | else if a == 1 { //~ ERROR ifs same condition
367 --> $DIR/copies.rs:356:8
372 error: this `if` has the same condition as a previous if
373 --> $DIR/copies.rs:365:13
375 365 | else if 2*a == 1 { //~ ERROR ifs same condition
379 --> $DIR/copies.rs:361:8
384 error: aborting due to 20 previous errors