]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/if_same_then_else.stderr
Auto merge of #99099 - Stargateur:phantomdata_debug, r=joshtriplett
[rust.git] / src / tools / clippy / tests / ui / if_same_then_else.stderr
1 error: this `if` has identical blocks
2   --> $DIR/if_same_then_else.rs:23:13
3    |
4 LL |       if true {
5    |  _____________^
6 LL | |         Foo { bar: 42 };
7 LL | |         0..10;
8 LL | |         ..;
9 ...  |
10 LL | |         foo();
11 LL | |     } else {
12    | |_____^
13    |
14 note: same as this
15   --> $DIR/if_same_then_else.rs:31:12
16    |
17 LL |       } else {
18    |  ____________^
19 LL | |         //~ ERROR same body as `if` block
20 LL | |         Foo { bar: 42 };
21 LL | |         0..10;
22 ...  |
23 LL | |         foo();
24 LL | |     }
25    | |_____^
26    = note: `-D clippy::if-same-then-else` implied by `-D warnings`
27
28 error: this `if` has identical blocks
29   --> $DIR/if_same_then_else.rs:67:21
30    |
31 LL |       let _ = if true {
32    |  _____________________^
33 LL | |         0.0
34 LL | |     } else {
35    | |_____^
36    |
37 note: same as this
38   --> $DIR/if_same_then_else.rs:69:12
39    |
40 LL |       } else {
41    |  ____________^
42 LL | |         //~ ERROR same body as `if` block
43 LL | |         0.0
44 LL | |     };
45    | |_____^
46
47 error: this `if` has identical blocks
48   --> $DIR/if_same_then_else.rs:74:21
49    |
50 LL |       let _ = if true {
51    |  _____________________^
52 LL | |         -0.0
53 LL | |     } else {
54    | |_____^
55    |
56 note: same as this
57   --> $DIR/if_same_then_else.rs:76:12
58    |
59 LL |       } else {
60    |  ____________^
61 LL | |         //~ ERROR same body as `if` block
62 LL | |         -0.0
63 LL | |     };
64    | |_____^
65
66 error: this `if` has identical blocks
67   --> $DIR/if_same_then_else.rs:90:21
68    |
69 LL |       let _ = if true {
70    |  _____________________^
71 LL | |         42
72 LL | |     } else {
73    | |_____^
74    |
75 note: same as this
76   --> $DIR/if_same_then_else.rs:92:12
77    |
78 LL |       } else {
79    |  ____________^
80 LL | |         //~ ERROR same body as `if` block
81 LL | |         42
82 LL | |     };
83    | |_____^
84
85 error: this `if` has identical blocks
86   --> $DIR/if_same_then_else.rs:97:13
87    |
88 LL |       if true {
89    |  _____________^
90 LL | |         let bar = if true { 42 } else { 43 };
91 LL | |
92 LL | |         while foo() {
93 ...  |
94 LL | |         bar + 1;
95 LL | |     } else {
96    | |_____^
97    |
98 note: same as this
99   --> $DIR/if_same_then_else.rs:104:12
100    |
101 LL |       } else {
102    |  ____________^
103 LL | |         //~ ERROR same body as `if` block
104 LL | |         let bar = if true { 42 } else { 43 };
105 LL | |
106 ...  |
107 LL | |         bar + 1;
108 LL | |     }
109    | |_____^
110
111 error: aborting due to 5 previous errors
112