summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/bad-if-statements.stderr
blob: ee839db64550923d9c3edaa701ec67764b03e49d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
error: missing condition for `if` expression
  --> $DIR/bad-if-statements.rs:2:7
   |
LL |     if {}
   |       ^- if this block is the condition of the `if` expression, then it must be followed by another block
   |       |
   |       expected condition here

error: this `if` expression is missing a block after the condition
  --> $DIR/bad-if-statements.rs:7:5
   |
LL |     if true && {}
   |     ^^
   |
help: this binary operation is possibly unfinished
  --> $DIR/bad-if-statements.rs:7:8
   |
LL |     if true && {}
   |        ^^^^^^^

error: expected `{`, found `x`
  --> $DIR/bad-if-statements.rs:13:13
   |
LL |     if true x
   |             ^ expected `{`
   |
note: the `if` expression is missing a block after this condition
  --> $DIR/bad-if-statements.rs:13:8
   |
LL |     if true x
   |        ^^^^
help: try placing this code inside a block
   |
LL |     if true { x }
   |             +   +

error: missing condition for `if` expression
  --> $DIR/bad-if-statements.rs:18:7
   |
LL |     if {} else {}
   |       ^- if this block is the condition of the `if` expression, then it must be followed by another block
   |       |
   |       expected condition here

error: this `if` expression is missing a block after the condition
  --> $DIR/bad-if-statements.rs:23:5
   |
LL |     if true && {} else {}
   |     ^^
   |
help: this binary operation is possibly unfinished
  --> $DIR/bad-if-statements.rs:23:8
   |
LL |     if true && {} else {}
   |        ^^^^^^^

error: expected `{`, found `x`
  --> $DIR/bad-if-statements.rs:29:13
   |
LL |     if true x else {}
   |             ^ expected `{`
   |
note: the `if` expression is missing a block after this condition
  --> $DIR/bad-if-statements.rs:29:8
   |
LL |     if true x else {}
   |        ^^^^
help: try placing this code inside a block
   |
LL |     if true { x } else {}
   |             +   +

error: this `if` expression is missing a block after the condition
  --> $DIR/bad-if-statements.rs:34:5
   |
LL |     if true else {}
   |     ^^
   |
help: add a block here
  --> $DIR/bad-if-statements.rs:34:12
   |
LL |     if true else {}
   |            ^

error: aborting due to 7 previous errors