1 error: this `if` has identical blocks
2 --> $DIR/if_same_then_else2.rs:19:12
6 LL | | //~ ERROR same body as `if` block
7 LL | | for _ in &[42] {
8 LL | | let foo: &Option<_> = &Some::<u8>(42);
14 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
16 --> $DIR/if_same_then_else2.rs:10:13
20 LL | | for _ in &[42] {
21 LL | | let foo: &Option<_> = &Some::<u8>(42);
28 error: this `if` has identical blocks
29 --> $DIR/if_same_then_else2.rs:33:12
33 LL | | //~ ERROR same body as `if` block
34 LL | | if let Some(a) = Some(42) {}
39 --> $DIR/if_same_then_else2.rs:31:13
43 LL | | if let Some(a) = Some(42) {}
47 error: this `if` has identical blocks
48 --> $DIR/if_same_then_else2.rs:40:12
52 LL | | //~ ERROR same body as `if` block
53 LL | | if let (1, .., 3) = (1, 2, 3) {}
58 --> $DIR/if_same_then_else2.rs:38:13
62 LL | | if let (1, .., 3) = (1, 2, 3) {}
66 error: this `if` has identical blocks
67 --> $DIR/if_same_then_else2.rs:90:12
71 LL | | //~ ERROR same body as `if` block
77 --> $DIR/if_same_then_else2.rs:88:21
79 LL | let _ = if true {
80 | _____________________^
85 error: this `if` has identical blocks
86 --> $DIR/if_same_then_else2.rs:97:12
90 LL | | //~ ERROR same body as `if` block
96 --> $DIR/if_same_then_else2.rs:95:13
104 error: this `if` has identical blocks
105 --> $DIR/if_same_then_else2.rs:122:12
110 LL | | return Ok(&foo[0..]);
115 --> $DIR/if_same_then_else2.rs:119:20
117 LL | } else if true {
118 | ____________________^
120 LL | | return Ok(&foo[0..]);
124 error: aborting due to 6 previous errors