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 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
30 --> $DIR/if_same_then_else2.rs:22:12
34 LL | | //~ ERROR same body as `if` block
35 LL | | for _ in &[42] {
36 LL | | let foo: &Option<_> = &Some::<u8>(42);
42 error: this `if` has identical blocks
43 --> $DIR/if_same_then_else2.rs:34:13
47 LL | | if let Some(a) = Some(42) {}
52 --> $DIR/if_same_then_else2.rs:36:12
56 LL | | //~ ERROR same body as `if` block
57 LL | | if let Some(a) = Some(42) {}
61 error: this `if` has identical blocks
62 --> $DIR/if_same_then_else2.rs:41:13
66 LL | | if let (1, .., 3) = (1, 2, 3) {}
71 --> $DIR/if_same_then_else2.rs:43:12
75 LL | | //~ ERROR same body as `if` block
76 LL | | if let (1, .., 3) = (1, 2, 3) {}
80 error: this `if` has identical blocks
81 --> $DIR/if_same_then_else2.rs:91:21
83 LL | let _ = if true {
84 | _____________________^
90 --> $DIR/if_same_then_else2.rs:93:12
94 LL | | //~ ERROR same body as `if` block
99 error: this `if` has identical blocks
100 --> $DIR/if_same_then_else2.rs:98:13
109 --> $DIR/if_same_then_else2.rs:100:12
113 LL | | //~ ERROR same body as `if` block
118 error: this `if` has identical blocks
119 --> $DIR/if_same_then_else2.rs:122:20
121 LL | } else if true {
122 | ____________________^
124 LL | | return Ok(&foo[0..]);
129 --> $DIR/if_same_then_else2.rs:125:12
134 LL | | return Ok(&foo[0..]);
138 error: aborting due to 6 previous errors