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