You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/ui/parser/expr-as-stmt.stderr
+7-44
Original file line number
Diff line number
Diff line change
@@ -7,31 +7,31 @@ LL | {2} + {2}
7
7
| help: parentheses are required to parse this as an expression: `({2})`
8
8
9
9
error: expected expression, found `+`
10
-
--> $DIR/expr-as-stmt.rs:12:9
10
+
--> $DIR/expr-as-stmt.rs:11:9
11
11
|
12
12
LL | {2} + 2
13
13
| --- ^ expected expression
14
14
| |
15
15
| help: parentheses are required to parse this as an expression: `({2})`
16
16
17
17
error: expected expression, found `+`
18
-
--> $DIR/expr-as-stmt.rs:18:12
18
+
--> $DIR/expr-as-stmt.rs:16:12
19
19
|
20
20
LL | { 42 } + foo;
21
21
| ------ ^ expected expression
22
22
| |
23
23
| help: parentheses are required to parse this as an expression: `({ 42 })`
24
24
25
25
error: expected expression, found `&&`
26
-
--> $DIR/expr-as-stmt.rs:30:5
26
+
--> $DIR/expr-as-stmt.rs:26:5
27
27
|
28
28
LL | if let Some(x) = a { true } else { false }
29
29
| ------------------------------------------ help: parentheses are required to parse this as an expression: `(if let Some(x) = a { true } else { false })`
30
30
LL | &&
31
31
| ^^ expected expression
32
32
33
33
error: expected expression, found `>`
34
-
--> $DIR/expr-as-stmt.rs:37:7
34
+
--> $DIR/expr-as-stmt.rs:33:7
35
35
|
36
36
LL | } > 0
37
37
| ^ expected expression
@@ -42,51 +42,14 @@ LL | _ => 1,
42
42
LL | }) > 0
43
43
|
44
44
45
-
error[E0308]: mismatched types
46
-
--> $DIR/expr-as-stmt.rs:7:6
47
-
|
48
-
LL | {2} + {2}
49
-
| ^ expected (), found integer
50
-
|
51
-
= note: expected type `()`
52
-
found type `{integer}`
53
-
54
-
error[E0308]: mismatched types
55
-
--> $DIR/expr-as-stmt.rs:12:6
56
-
|
57
-
LL | {2} + 2
58
-
| ^ expected (), found integer
59
-
|
60
-
= note: expected type `()`
61
-
found type `{integer}`
62
-
63
-
error[E0308]: mismatched types
64
-
--> $DIR/expr-as-stmt.rs:18:7
65
-
|
66
-
LL | { 42 } + foo;
67
-
| ^^ expected (), found integer
68
-
|
69
-
= note: expected type `()`
70
-
found type `{integer}`
71
-
72
-
error[E0308]: mismatched types
73
-
--> $DIR/expr-as-stmt.rs:24:7
74
-
|
75
-
LL | { 3 } * 3
76
-
| ^ expected (), found integer
77
-
|
78
-
= note: expected type `()`
79
-
found type `{integer}`
80
-
81
45
error[E0614]: type `{integer}` cannot be dereferenced
82
-
--> $DIR/expr-as-stmt.rs:24:11
46
+
--> $DIR/expr-as-stmt.rs:21:11
83
47
|
84
48
LL | { 3 } * 3
85
49
| ----- ^^^
86
50
| |
87
51
| help: parentheses are required to parse this as an expression: `({ 3 })`
88
52
89
-
error: aborting due to 10 previous errors
53
+
error: aborting due to 6 previous errors
90
54
91
-
Some errors have detailed explanations: E0308, E0614.
92
-
For more information about an error, try `rustc --explain E0308`.
55
+
For more information about this error, try `rustc --explain E0614`.
0 commit comments