1 error: this `if` has identical blocks
2 --> $DIR/if_same_then_else2.rs:14:13
6 LL | | for _ in &[42] {
7 LL | | let foo: &Option<_> = &Some::<u8>(42);
8 LL | | if foo.is_some() {
14 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
16 --> $DIR/if_same_then_else2.rs:23:12
20 LL | | //~ ERROR same body as `if` block
21 LL | | for _ in &[42] {
22 LL | | let bar: &Option<_> = &Some::<u8>(42);
28 error: this `if` has identical blocks
29 --> $DIR/if_same_then_else2.rs:35:13
33 LL | | if let Some(a) = Some(42) {}
38 --> $DIR/if_same_then_else2.rs:37:12
42 LL | | //~ ERROR same body as `if` block
43 LL | | if let Some(a) = Some(42) {}
47 error: this `if` has identical blocks
48 --> $DIR/if_same_then_else2.rs:42:13
52 LL | | if let (1, .., 3) = (1, 2, 3) {}
57 --> $DIR/if_same_then_else2.rs:44:12
61 LL | | //~ ERROR same body as `if` block
62 LL | | if let (1, .., 3) = (1, 2, 3) {}
66 error: this `if` has identical blocks
67 --> $DIR/if_same_then_else2.rs:92:21
69 LL | let _ = if true {
70 | _____________________^
76 --> $DIR/if_same_then_else2.rs:94:12
80 LL | | //~ ERROR same body as `if` block
85 error: this `if` has identical blocks
86 --> $DIR/if_same_then_else2.rs:99:13
95 --> $DIR/if_same_then_else2.rs:101:12
99 LL | | //~ ERROR same body as `if` block
104 error: this `if` has identical blocks
105 --> $DIR/if_same_then_else2.rs:123:20
107 LL | } else if true {
108 | ____________________^
110 LL | | return Ok(&foo[0..]);
115 --> $DIR/if_same_then_else2.rs:126:12
120 LL | | return Ok(&foo[0..]);
124 error: aborting due to 6 previous errors