]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/bad-if-statements.stderr
Rollup merge of #107354 - tspiteri:source-serif-4.005, r=GuillaumeGomez
[rust.git] / tests / ui / parser / bad-if-statements.stderr
1 error: missing condition for `if` expression
2   --> $DIR/bad-if-statements.rs:2:7
3    |
4 LL |     if {}
5    |       ^- if this block is the condition of the `if` expression, then it must be followed by another block
6    |       |
7    |       expected condition here
8
9 error: this `if` expression is missing a block after the condition
10   --> $DIR/bad-if-statements.rs:7:5
11    |
12 LL |     if true && {}
13    |     ^^
14    |
15 help: this binary operation is possibly unfinished
16   --> $DIR/bad-if-statements.rs:7:8
17    |
18 LL |     if true && {}
19    |        ^^^^^^^
20
21 error: expected `{`, found `x`
22   --> $DIR/bad-if-statements.rs:13:13
23    |
24 LL |     if true x
25    |             ^ expected `{`
26    |
27 note: the `if` expression is missing a block after this condition
28   --> $DIR/bad-if-statements.rs:13:8
29    |
30 LL |     if true x
31    |        ^^^^
32 help: try placing this code inside a block
33    |
34 LL |     if true { x }
35    |             +   +
36
37 error: missing condition for `if` expression
38   --> $DIR/bad-if-statements.rs:18:7
39    |
40 LL |     if {} else {}
41    |       ^- if this block is the condition of the `if` expression, then it must be followed by another block
42    |       |
43    |       expected condition here
44
45 error: this `if` expression is missing a block after the condition
46   --> $DIR/bad-if-statements.rs:23:5
47    |
48 LL |     if true && {} else {}
49    |     ^^
50    |
51 help: this binary operation is possibly unfinished
52   --> $DIR/bad-if-statements.rs:23:8
53    |
54 LL |     if true && {} else {}
55    |        ^^^^^^^
56
57 error: expected `{`, found `x`
58   --> $DIR/bad-if-statements.rs:29:13
59    |
60 LL |     if true x else {}
61    |             ^ expected `{`
62    |
63 note: the `if` expression is missing a block after this condition
64   --> $DIR/bad-if-statements.rs:29:8
65    |
66 LL |     if true x else {}
67    |        ^^^^
68 help: try placing this code inside a block
69    |
70 LL |     if true { x } else {}
71    |             +   +
72
73 error: this `if` expression is missing a block after the condition
74   --> $DIR/bad-if-statements.rs:34:5
75    |
76 LL |     if true else {}
77    |     ^^
78    |
79 help: add a block here
80   --> $DIR/bad-if-statements.rs:34:12
81    |
82 LL |     if true else {}
83    |            ^
84
85 error: aborting due to 7 previous errors
86