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