]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/expr-as-stmt.stderr
031196054327757554ae70429a06d5e3aa9eacc4
[rust.git] / src / test / ui / parser / expr-as-stmt.stderr
1 error: expected expression, found `+`
2   --> $DIR/expr-as-stmt.rs:7:9
3    |
4 LL |     {2} + {2}
5    |     --- ^ expected expression
6    |     |
7    |     help: parenthesis are required to parse this as an expression: `({2})`
8
9 error: expected expression, found `+`
10   --> $DIR/expr-as-stmt.rs:12:9
11    |
12 LL |     {2} + 2
13    |     --- ^ expected expression
14    |     |
15    |     help: parenthesis are required to parse this as an expression: `({2})`
16
17 error: expected expression, found `+`
18   --> $DIR/expr-as-stmt.rs:18:12
19    |
20 LL |     { 42 } + foo;
21    |     ------ ^ expected expression
22    |     |
23    |     help: parenthesis are required to parse this as an expression: `({ 42 })`
24
25 error: ambiguous parse
26   --> $DIR/expr-as-stmt.rs:30:5
27    |
28 LL |     if let Some(x) = a { true } else { false }
29    |     ------------------------------------------ help: parenthesis are required to parse this as an expression: `(if let Some(x) = a { true } else { false })`
30 LL |     &&
31    |     ^^
32
33 error[E0308]: mismatched types
34   --> $DIR/expr-as-stmt.rs:7:6
35    |
36 LL |     {2} + {2}
37    |      ^ expected (), found integer
38    |
39    = note: expected type `()`
40               found type `{integer}`
41
42 error[E0308]: mismatched types
43   --> $DIR/expr-as-stmt.rs:12:6
44    |
45 LL |     {2} + 2
46    |      ^ expected (), found integer
47    |
48    = note: expected type `()`
49               found type `{integer}`
50
51 error[E0308]: mismatched types
52   --> $DIR/expr-as-stmt.rs:18:7
53    |
54 LL |     { 42 } + foo;
55    |       ^^ expected (), found integer
56    |
57    = note: expected type `()`
58               found type `{integer}`
59
60 error[E0308]: mismatched types
61   --> $DIR/expr-as-stmt.rs:24:7
62    |
63 LL |     { 3 } * 3
64    |       ^ expected (), found integer
65    |
66    = note: expected type `()`
67               found type `{integer}`
68
69 error[E0614]: type `{integer}` cannot be dereferenced
70   --> $DIR/expr-as-stmt.rs:24:11
71    |
72 LL |     { 3 } * 3
73    |     ----- ^^^
74    |     |
75    |     help: parenthesis are required to parse this as an expression: `({ 3 })`
76
77 error: aborting due to 9 previous errors
78
79 Some errors have detailed explanations: E0308, E0614.
80 For more information about an error, try `rustc --explain E0308`.