1 error: this `if` has identical blocks
2 --> $DIR/if_same_then_else2.rs:13: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:22: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:34:13
33 LL | | if let Some(a) = Some(42) {}
38 --> $DIR/if_same_then_else2.rs:36: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:41:13
52 LL | | if let (1, .., 3) = (1, 2, 3) {}
57 --> $DIR/if_same_then_else2.rs:43: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:91:21
69 LL | let _ = if true {
70 | _____________________^
76 --> $DIR/if_same_then_else2.rs:93:12
80 LL | | //~ ERROR same body as `if` block
85 error: this `if` has identical blocks
86 --> $DIR/if_same_then_else2.rs:98:13
95 --> $DIR/if_same_then_else2.rs:100:12
99 LL | | //~ ERROR same body as `if` block
104 error: this `if` has identical blocks
105 --> $DIR/if_same_then_else2.rs:122:20
107 LL | } else if true {
108 | ____________________^
110 LL | | return Ok(&foo[0..]);
115 --> $DIR/if_same_then_else2.rs:125:12
120 LL | | return Ok(&foo[0..]);
124 error: aborting due to 6 previous errors