1 error: this `if` has identical blocks
2 --> $DIR/if_same_then_else.rs:31:12
6 LL | | //~ ERROR same body as `if` block
7 LL | | Foo { bar: 42 };
14 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
16 --> $DIR/if_same_then_else.rs:23:13
20 LL | | Foo { bar: 42 };
28 error: this `if` has identical blocks
29 --> $DIR/if_same_then_else.rs:69:12
33 LL | | //~ ERROR same body as `if` block
39 --> $DIR/if_same_then_else.rs:67:21
41 LL | let _ = if true {
42 | _____________________^
47 error: this `if` has identical blocks
48 --> $DIR/if_same_then_else.rs:76:12
52 LL | | //~ ERROR same body as `if` block
58 --> $DIR/if_same_then_else.rs:74:21
60 LL | let _ = if true {
61 | _____________________^
66 error: this `if` has identical blocks
67 --> $DIR/if_same_then_else.rs:92:12
71 LL | | //~ ERROR same body as `if` block
77 --> $DIR/if_same_then_else.rs:90:21
79 LL | let _ = if true {
80 | _____________________^
85 error: this `if` has identical blocks
86 --> $DIR/if_same_then_else.rs:106:12
90 LL | | //~ ERROR same body as `if` block
91 LL | | for _ in &[42] {
92 LL | | let foo: &Option<_> = &Some::<u8>(42);
99 --> $DIR/if_same_then_else.rs:97:13
103 LL | | for _ in &[42] {
104 LL | | let foo: &Option<_> = &Some::<u8>(42);
111 error: this `if` has identical blocks
112 --> $DIR/if_same_then_else.rs:125:12
116 LL | | //~ ERROR same body as `if` block
117 LL | | let bar = if true { 42 } else { 43 };
125 --> $DIR/if_same_then_else.rs:118:13
129 LL | | let bar = if true { 42 } else { 43 };
137 error: this `if` has identical blocks
138 --> $DIR/if_same_then_else.rs:155:12
142 LL | | //~ ERROR same body as `if` block
143 LL | | if let Some(a) = Some(42) {}
148 --> $DIR/if_same_then_else.rs:153:13
152 LL | | if let Some(a) = Some(42) {}
156 error: this `if` has identical blocks
157 --> $DIR/if_same_then_else.rs:162:12
161 LL | | //~ ERROR same body as `if` block
162 LL | | if let (1, .., 3) = (1, 2, 3) {}
167 --> $DIR/if_same_then_else.rs:160:13
171 LL | | if let (1, .., 3) = (1, 2, 3) {}
175 error: this `if` has identical blocks
176 --> $DIR/if_same_then_else.rs:212:12
180 LL | | //~ ERROR same body as `if` block
186 --> $DIR/if_same_then_else.rs:210:21
188 LL | let _ = if true {
189 | _____________________^
194 error: this `if` has identical blocks
195 --> $DIR/if_same_then_else.rs:219:12
199 LL | | //~ ERROR same body as `if` block
200 LL | | try!(Ok("foo"));
205 --> $DIR/if_same_then_else.rs:217:13
209 LL | | try!(Ok("foo"));
213 error: aborting due to 10 previous errors