]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/expr-as-stmt.stderr
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[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: parentheses 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: parentheses 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: parentheses are required to parse this as an expression: `({ 42 })`
24
25 error: expected expression, found `>`
26   --> $DIR/expr-as-stmt.rs:31:7
27    |
28 LL |     } > 0
29    |       ^ expected expression
30    |
31 help: parentheses are required to parse this as an expression
32    |
33 LL |     (match x {
34 LL |         _ => 1,
35 LL |     }) > 0
36    |
37
38 error[E0308]: mismatched types
39   --> $DIR/expr-as-stmt.rs:7:6
40    |
41 LL |     {2} + {2}
42    |      ^ expected `()`, found integer
43
44 error[E0308]: mismatched types
45   --> $DIR/expr-as-stmt.rs:12:6
46    |
47 LL |     {2} + 2
48    |      ^ expected `()`, found integer
49
50 error[E0308]: mismatched types
51   --> $DIR/expr-as-stmt.rs:18:7
52    |
53 LL |     { 42 } + foo;
54    |       ^^ expected `()`, found integer
55
56 error[E0308]: mismatched types
57   --> $DIR/expr-as-stmt.rs:24:7
58    |
59 LL |     { 3 } * 3
60    |       ^ expected `()`, found integer
61
62 error[E0614]: type `{integer}` cannot be dereferenced
63   --> $DIR/expr-as-stmt.rs:24:11
64    |
65 LL |     { 3 } * 3
66    |     ----- ^^^
67    |     |
68    |     help: parentheses are required to parse this as an expression: `({ 3 })`
69
70 error: aborting due to 9 previous errors
71
72 Some errors have detailed explanations: E0308, E0614.
73 For more information about an error, try `rustc --explain E0308`.