1 error: expected expression, found `+`
2 --> $DIR/expr-as-stmt.rs:8:9
5 | --- ^ expected expression
7 | help: parentheses are required to parse this as an expression: `({2})`
9 error: expected expression, found `+`
10 --> $DIR/expr-as-stmt.rs:13:9
13 | --- ^ expected expression
15 | help: parentheses are required to parse this as an expression: `({2})`
17 error: expected expression, found `+`
18 --> $DIR/expr-as-stmt.rs:19:12
21 | ------ ^ expected expression
23 | help: parentheses are required to parse this as an expression: `({ 42 })`
25 error: expected expression, found `>`
26 --> $DIR/expr-as-stmt.rs:32:7
29 | ^ expected expression
31 help: parentheses are required to parse this as an expression
38 error[E0308]: mismatched types
39 --> $DIR/expr-as-stmt.rs:8:6
42 | ^ expected `()`, found integer
44 help: you might have meant to return this value
46 LL | {return 2;} + {2}
49 error[E0308]: mismatched types
50 --> $DIR/expr-as-stmt.rs:13:6
53 | ^ expected `()`, found integer
55 help: you might have meant to return this value
60 error[E0308]: mismatched types
61 --> $DIR/expr-as-stmt.rs:19:7
64 | ^^ expected `()`, found integer
66 help: you might have meant to return this value
68 LL | { return 42; } + foo;
71 error[E0308]: mismatched types
72 --> $DIR/expr-as-stmt.rs:25:7
75 | ^ expected `()`, found integer
77 help: you might have meant to return this value
79 LL | { return 3; } * 3
82 error[E0614]: type `{integer}` cannot be dereferenced
83 --> $DIR/expr-as-stmt.rs:25:11
88 | help: parentheses are required to parse this as an expression: `({ 3 })`
90 error: aborting due to 9 previous errors
92 Some errors have detailed explanations: E0308, E0614.
93 For more information about an error, try `rustc --explain E0308`.