1 error: this `if` has identical blocks
2 --> $DIR/copies.rs:40:10
6 41 | | Foo { bar: 42 };
14 note: lint level defined here
15 --> $DIR/copies.rs:27:8
17 27 | #[deny(if_same_then_else)]
20 --> $DIR/copies.rs:30:13
25 32 | | Foo { bar: 42 };
32 error: this `match` has identical arm bodies
33 --> $DIR/copies.rs:91:14
38 93 | | let mut a = 42 + [23].len() as i32;
45 note: lint level defined here
46 --> $DIR/copies.rs:28:8
48 28 | #[deny(match_same_arms)]
51 --> $DIR/copies.rs:80:15
62 note: `42` has the same arm body as the `_` wildcard, consider removing it`
63 --> $DIR/copies.rs:80:15
75 error: this `match` has identical arm bodies
76 --> $DIR/copies.rs:107:14
82 --> $DIR/copies.rs:103:19
86 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
87 --> $DIR/copies.rs:103:19
92 error: this `if` has identical blocks
93 --> $DIR/copies.rs:118:10
102 --> $DIR/copies.rs:114:21
104 114 | let _ = if true {
105 | _____________________^
111 error: this `if` has identical blocks
112 --> $DIR/copies.rs:133:10
116 134 | | for _ in &[42] {
117 135 | | let foo: &Option<_> = &Some::<u8>(42);
125 --> $DIR/copies.rs:122:13
130 124 | | for _ in &[42] {
131 125 | | let foo: &Option<_> = &Some::<u8>(42);
137 error: this `if` has identical blocks
138 --> $DIR/copies.rs:156:10
142 157 | | let bar = if true {
151 --> $DIR/copies.rs:144:13
156 146 | | let bar = if true {
163 error: this `if` has identical blocks
164 --> $DIR/copies.rs:180:19
166 180 | else if foo() {
167 | ___________________^
168 181 | | let _ = match 42 {
170 183 | | a if a > 0 => 2,
177 --> $DIR/copies.rs:168:13
182 170 | | let _ = match 42 {
189 error: this `if` has identical blocks
190 --> $DIR/copies.rs:193:10
194 194 | | if let Some(a) = Some(42) {}
199 --> $DIR/copies.rs:189:13
204 191 | | if let Some(a) = Some(42) {}
208 error: this `if` has identical blocks
209 --> $DIR/copies.rs:201:10
213 202 | | if let (1, .., 3) = (1, 2, 3) {}
218 --> $DIR/copies.rs:197:13
223 199 | | if let (1, .., 3) = (1, 2, 3) {}
227 error: this `match` has identical arm bodies
228 --> $DIR/copies.rs:258:15
234 --> $DIR/copies.rs:255:15
238 note: consider refactoring into `42 | 51`
239 --> $DIR/copies.rs:255:15
244 error: this `match` has identical arm bodies
245 --> $DIR/copies.rs:266:17
251 --> $DIR/copies.rs:263:20
255 note: consider refactoring into `Some(_) | None`
256 --> $DIR/copies.rs:263:20
261 error: this `match` has identical arm bodies
262 --> $DIR/copies.rs:290:28
264 290 | (None, Some(a)) => bar(a),
268 --> $DIR/copies.rs:287:28
270 287 | (Some(a), None) => bar(a),
272 note: consider refactoring into `(Some(a), None) | (None, Some(a))`
273 --> $DIR/copies.rs:287:28
275 287 | (Some(a), None) => bar(a),
278 error: this `match` has identical arm bodies
279 --> $DIR/copies.rs:298:26
281 298 | (.., Some(a)) => bar(a),
285 --> $DIR/copies.rs:295:26
287 295 | (Some(a), ..) => bar(a),
289 note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
290 --> $DIR/copies.rs:295:26
292 295 | (Some(a), ..) => bar(a),
295 error: this `match` has identical arm bodies
296 --> $DIR/copies.rs:306:20
302 --> $DIR/copies.rs:303:23
304 303 | (1, .., 3) => 42,
306 note: consider refactoring into `(1, .., 3) | (.., 3)`
307 --> $DIR/copies.rs:303:23
309 303 | (1, .., 3) => 42,
312 error: this `if` has identical blocks
313 --> $DIR/copies.rs:313:12
322 --> $DIR/copies.rs:310:21
324 310 | let _ = if true {
325 | _____________________^
331 error: this `if` has identical blocks
332 --> $DIR/copies.rs:320:12
341 --> $DIR/copies.rs:317:21
343 317 | let _ = if true {
344 | _____________________^
350 error: this `if` has identical blocks
351 --> $DIR/copies.rs:341:12
355 342 | | std::f32::NAN
360 --> $DIR/copies.rs:338:21
362 338 | let _ = if true {
363 | _____________________^
365 340 | | std::f32::NAN
369 error: this `if` has identical blocks
370 --> $DIR/copies.rs:360:10
374 361 | | try!(Ok("foo"));
379 --> $DIR/copies.rs:356:13
384 358 | | try!(Ok("foo"));
388 error: this `if` has identical blocks
389 --> $DIR/copies.rs:373:10
393 374 | | let foo = "";
394 375 | | return Ok(&foo[0..]);
399 --> $DIR/copies.rs:364:13
404 366 | | let foo = "";
405 367 | | return Ok(&foo[0..]);
409 error: this `if` has the same condition as a previous if
410 --> $DIR/copies.rs:388:13
415 note: lint level defined here
416 --> $DIR/copies.rs:379:8
418 379 | #[deny(ifs_same_cond)]
421 --> $DIR/copies.rs:385:8
426 error: this `if` has the same condition as a previous if
427 --> $DIR/copies.rs:394:13
429 394 | else if a == 1 {
433 --> $DIR/copies.rs:391:8
438 error: this `if` has the same condition as a previous if
439 --> $DIR/copies.rs:402:13
441 402 | else if 2*a == 1 {
445 --> $DIR/copies.rs:397:8
450 error: aborting due to 22 previous errors