]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/if_same_then_else.stderr
New upstream version 1.53.0+dfsg1
[rustc.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:21: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: `-D clippy::if-same-then-else` implied by `-D warnings`
15 note: same as this
16 --> $DIR/if_same_then_else.rs:29:12
17 |
18 LL | } else {
19 | ____________^
20 LL | | //~ ERROR same body as `if` block
21 LL | | Foo { bar: 42 };
22 LL | | 0..10;
23 ... |
24 LL | | foo();
25 LL | | }
26 | |_____^
27
28 error: this `if` has identical blocks
29 --> $DIR/if_same_then_else.rs:65: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:67: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:72: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:74: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:88: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:90: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:95: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:102: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