1error: this `if` has identical blocks
2  --> $DIR/if_same_then_else2.rs:14:13
3   |
4LL |       if true {
5   |  _____________^
6LL | |         for _ in &[42] {
7LL | |             let foo: &Option<_> = &Some::<u8>(42);
8LL | |             if foo.is_some() {
9...  |
10LL | |         }
11LL | |     } else {
12   | |_____^
13   |
14   = note: `-D clippy::if-same-then-else` implied by `-D warnings`
15note: same as this
16  --> $DIR/if_same_then_else2.rs:23:12
17   |
18LL |       } else {
19   |  ____________^
20LL | |         //~ ERROR same body as `if` block
21LL | |         for _ in &[42] {
22LL | |             let bar: &Option<_> = &Some::<u8>(42);
23...  |
24LL | |         }
25LL | |     }
26   | |_____^
27
28error: this `if` has identical blocks
29  --> $DIR/if_same_then_else2.rs:35:13
30   |
31LL |       if true {
32   |  _____________^
33LL | |         if let Some(a) = Some(42) {}
34LL | |     } else {
35   | |_____^
36   |
37note: same as this
38  --> $DIR/if_same_then_else2.rs:37:12
39   |
40LL |       } else {
41   |  ____________^
42LL | |         //~ ERROR same body as `if` block
43LL | |         if let Some(a) = Some(42) {}
44LL | |     }
45   | |_____^
46
47error: this `if` has identical blocks
48  --> $DIR/if_same_then_else2.rs:42:13
49   |
50LL |       if true {
51   |  _____________^
52LL | |         if let (1, .., 3) = (1, 2, 3) {}
53LL | |     } else {
54   | |_____^
55   |
56note: same as this
57  --> $DIR/if_same_then_else2.rs:44:12
58   |
59LL |       } else {
60   |  ____________^
61LL | |         //~ ERROR same body as `if` block
62LL | |         if let (1, .., 3) = (1, 2, 3) {}
63LL | |     }
64   | |_____^
65
66error: this `if` has identical blocks
67  --> $DIR/if_same_then_else2.rs:92:21
68   |
69LL |       let _ = if true {
70   |  _____________________^
71LL | |         f32::NAN
72LL | |     } else {
73   | |_____^
74   |
75note: same as this
76  --> $DIR/if_same_then_else2.rs:94:12
77   |
78LL |       } else {
79   |  ____________^
80LL | |         //~ ERROR same body as `if` block
81LL | |         f32::NAN
82LL | |     };
83   | |_____^
84
85error: this `if` has identical blocks
86  --> $DIR/if_same_then_else2.rs:99:13
87   |
88LL |       if true {
89   |  _____________^
90LL | |         Ok("foo")?;
91LL | |     } else {
92   | |_____^
93   |
94note: same as this
95  --> $DIR/if_same_then_else2.rs:101:12
96   |
97LL |       } else {
98   |  ____________^
99LL | |         //~ ERROR same body as `if` block
100LL | |         Ok("foo")?;
101LL | |     }
102   | |_____^
103
104error: this `if` has identical blocks
105  --> $DIR/if_same_then_else2.rs:123:20
106   |
107LL |       } else if true {
108   |  ____________________^
109LL | |         let foo = "";
110LL | |         return Ok(&foo[0..]);
111LL | |     } else {
112   | |_____^
113   |
114note: same as this
115  --> $DIR/if_same_then_else2.rs:126:12
116   |
117LL |       } else {
118   |  ____________^
119LL | |         let foo = "";
120LL | |         return Ok(&foo[0..]);
121LL | |     }
122   | |_____^
123
124error: aborting due to 6 previous errors
125
126