]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/expr-as-stmt.stderr
Add inferred args to typeck
[rust.git] / src / test / ui / parser / expr-as-stmt.stderr
1 error: expected expression, found `+`
2   --> $DIR/expr-as-stmt.rs:8: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:13: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:19: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:32: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:8:6
40    |
41 LL |     {2} + {2}
42    |      ^ expected `()`, found integer
43    |
44 help: you might have meant to return this value
45    |
46 LL |     {return 2;} + {2}
47    |      ^^^^^^  ^
48
49 error[E0308]: mismatched types
50   --> $DIR/expr-as-stmt.rs:13:6
51    |
52 LL |     {2} + 2
53    |      ^ expected `()`, found integer
54    |
55 help: you might have meant to return this value
56    |
57 LL |     {return 2;} + 2
58    |      ^^^^^^  ^
59
60 error[E0308]: mismatched types
61   --> $DIR/expr-as-stmt.rs:19:7
62    |
63 LL |     { 42 } + foo;
64    |       ^^ expected `()`, found integer
65    |
66 help: you might have meant to return this value
67    |
68 LL |     { return 42; } + foo;
69    |       ^^^^^^   ^
70
71 error[E0308]: mismatched types
72   --> $DIR/expr-as-stmt.rs:25:7
73    |
74 LL |     { 3 } * 3
75    |       ^ expected `()`, found integer
76    |
77 help: you might have meant to return this value
78    |
79 LL |     { return 3; } * 3
80    |       ^^^^^^  ^
81
82 error[E0614]: type `{integer}` cannot be dereferenced
83   --> $DIR/expr-as-stmt.rs:25:11
84    |
85 LL |     { 3 } * 3
86    |     ----- ^^^
87    |     |
88    |     help: parentheses are required to parse this as an expression: `({ 3 })`
89
90 error: aborting due to 9 previous errors
91
92 Some errors have detailed explanations: E0308, E0614.
93 For more information about an error, try `rustc --explain E0308`.