1 warning: This else block is redundant.
3 --> $DIR/copies.rs:121:20
6 | ____________________^
11 = note: #[warn(needless_continue)] on by default
12 = help: Consider dropping the else clause and merging the code that follows (in the loop) with the if block, like so:
15 // Merged code follows...
19 warning: This else block is redundant.
21 --> $DIR/copies.rs:131:20
24 | ____________________^
29 = note: #[warn(needless_continue)] on by default
30 = help: Consider dropping the else clause and merging the code that follows (in the loop) with the if block, like so:
33 // Merged code follows...
37 error: this `if` has identical blocks
38 --> $DIR/copies.rs:39:10
42 40 | | Foo { bar: 42 };
50 note: lint level defined here
51 --> $DIR/copies.rs:27:8
53 27 | #[deny(if_same_then_else)]
56 --> $DIR/copies.rs:30:13
60 31 | | Foo { bar: 42 };
68 error: this `match` has identical arm bodies
69 --> $DIR/copies.rs:88:14
74 90 | | let mut a = 42 + [23].len() as i32;
81 note: lint level defined here
82 --> $DIR/copies.rs:28:8
84 28 | #[deny(match_same_arms)]
87 --> $DIR/copies.rs:79:15
92 81 | | let mut a = 42 + [23].len() as i32;
98 note: `42` has the same arm body as the `_` wildcard, consider removing it`
99 --> $DIR/copies.rs:79:15
104 81 | | let mut a = 42 + [23].len() as i32;
111 error: this `match` has identical arm bodies
112 --> $DIR/copies.rs:102:14
118 --> $DIR/copies.rs:100:19
122 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
123 --> $DIR/copies.rs:100:19
128 error: this `if` has identical blocks
129 --> $DIR/copies.rs:112:10
138 --> $DIR/copies.rs:109:21
140 109 | let _ = if true {
141 | _____________________^
146 error: this `if` has identical blocks
147 --> $DIR/copies.rs:126:10
151 127 | | for _ in &[42] {
152 128 | | let foo: &Option<_> = &Some::<u8>(42);
160 --> $DIR/copies.rs:116:13
164 117 | | for _ in &[42] {
165 118 | | let foo: &Option<_> = &Some::<u8>(42);
172 error: this `if` has identical blocks
173 --> $DIR/copies.rs:148:10
177 149 | | let bar = if true {
186 --> $DIR/copies.rs:137:13
190 138 | | let bar = if true {
198 error: this `if` has identical blocks
199 --> $DIR/copies.rs:171:19
201 171 | else if foo() {
202 | ___________________^
203 172 | | let _ = match 42 {
205 174 | | a if a > 0 => 2,
212 --> $DIR/copies.rs:160:13
216 161 | | let _ = match 42 {
218 163 | | a if a > 0 => 2,
224 error: this `if` has identical blocks
225 --> $DIR/copies.rs:183:10
229 184 | | if let Some(a) = Some(42) {}
234 --> $DIR/copies.rs:180:13
238 181 | | if let Some(a) = Some(42) {}
242 error: this `if` has identical blocks
243 --> $DIR/copies.rs:190:10
247 191 | | if let (1, .., 3) = (1, 2, 3) {}
252 --> $DIR/copies.rs:187:13
256 188 | | if let (1, .., 3) = (1, 2, 3) {}
260 error: this `match` has identical arm bodies
261 --> $DIR/copies.rs:245:15
267 --> $DIR/copies.rs:244:15
271 note: consider refactoring into `42 | 51`
272 --> $DIR/copies.rs:244:15
277 error: this `match` has identical arm bodies
278 --> $DIR/copies.rs:251:17
284 --> $DIR/copies.rs:250:20
288 note: consider refactoring into `Some(_) | None`
289 --> $DIR/copies.rs:250:20
294 error: this `match` has identical arm bodies
295 --> $DIR/copies.rs:273:28
297 273 | (None, Some(a)) => bar(a),
301 --> $DIR/copies.rs:272:28
303 272 | (Some(a), None) => bar(a),
305 note: consider refactoring into `(Some(a), None) | (None, Some(a))`
306 --> $DIR/copies.rs:272:28
308 272 | (Some(a), None) => bar(a),
311 error: this `match` has identical arm bodies
312 --> $DIR/copies.rs:279:26
314 279 | (.., Some(a)) => bar(a),
318 --> $DIR/copies.rs:278:26
320 278 | (Some(a), ..) => bar(a),
322 note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
323 --> $DIR/copies.rs:278:26
325 278 | (Some(a), ..) => bar(a),
328 error: this `match` has identical arm bodies
329 --> $DIR/copies.rs:285:20
335 --> $DIR/copies.rs:284:23
337 284 | (1, .., 3) => 42,
339 note: consider refactoring into `(1, .., 3) | (.., 3)`
340 --> $DIR/copies.rs:284:23
342 284 | (1, .., 3) => 42,
345 error: this `if` has identical blocks
346 --> $DIR/copies.rs:291:12
355 --> $DIR/copies.rs:289:21
357 289 | let _ = if true {
358 | _____________________^
363 error: this `if` has identical blocks
364 --> $DIR/copies.rs:297:12
373 --> $DIR/copies.rs:295:21
375 295 | let _ = if true {
376 | _____________________^
381 error: this `if` has identical blocks
382 --> $DIR/copies.rs:317:12
386 318 | | std::f32::NAN
391 --> $DIR/copies.rs:315:21
393 315 | let _ = if true {
394 | _____________________^
395 316 | | std::f32::NAN
399 error: this `if` has identical blocks
400 --> $DIR/copies.rs:335:10
404 336 | | try!(Ok("foo"));
409 --> $DIR/copies.rs:332:13
413 333 | | try!(Ok("foo"));
417 error: this `if` has identical blocks
418 --> $DIR/copies.rs:347:10
422 348 | | let foo = "";
423 349 | | return Ok(&foo[0..]);
428 --> $DIR/copies.rs:339:13
432 340 | | let foo = "";
433 341 | | return Ok(&foo[0..]);
437 error: this `if` has the same condition as a previous if
438 --> $DIR/copies.rs:361:13
443 note: lint level defined here
444 --> $DIR/copies.rs:353:8
446 353 | #[deny(ifs_same_cond)]
449 --> $DIR/copies.rs:359:8
454 error: this `if` has the same condition as a previous if
455 --> $DIR/copies.rs:366:13
457 366 | else if a == 1 {
461 --> $DIR/copies.rs:364:8
466 error: this `if` has the same condition as a previous if
467 --> $DIR/copies.rs:373:13
469 373 | else if 2*a == 1 {
473 --> $DIR/copies.rs:369:8
478 error: aborting due to 22 previous errors