summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/expr-as-stmt.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/expr-as-stmt.stderr')
-rw-r--r--src/test/ui/parser/expr-as-stmt.stderr43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/test/ui/parser/expr-as-stmt.stderr b/src/test/ui/parser/expr-as-stmt.stderr
index 6da4ac340..18c8b0b7c 100644
--- a/src/test/ui/parser/expr-as-stmt.stderr
+++ b/src/test/ui/parser/expr-as-stmt.stderr
@@ -55,6 +55,28 @@ help: parentheses are required to parse this as an expression
LL | ({ true }) | { true }
| + +
+error: expected expression, found `+`
+ --> $DIR/expr-as-stmt.rs:69:26
+ |
+LL | match () { () => 1 } + match () { () => 1 }
+ | ^ expected expression
+ |
+help: parentheses are required to parse this as an expression
+ |
+LL | (match () { () => 1 }) + match () { () => 1 }
+ | + +
+
+error: expected expression, found `+`
+ --> $DIR/expr-as-stmt.rs:75:18
+ |
+LL | unsafe { 1 } + unsafe { 1 }
+ | ^ expected expression
+ |
+help: parentheses are required to parse this as an expression
+ |
+LL | (unsafe { 1 }) + unsafe { 1 }
+ | + +
+
error[E0308]: mismatched types
--> $DIR/expr-as-stmt.rs:64:7
|
@@ -201,7 +223,26 @@ help: parentheses are required to parse this as an expression
LL | ({ true }) || { true }
| + +
-error: aborting due to 18 previous errors
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:69:5
+ |
+LL | match () { () => 1 } + match () { () => 1 }
+ | ^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here
+ | |
+ | expected `()`, found integer
+
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:75:14
+ |
+LL | unsafe { 1 } + unsafe { 1 }
+ | ^ expected `()`, found integer
+ |
+help: you might have meant to return this value
+ |
+LL | unsafe { return 1; } + unsafe { 1 }
+ | ++++++ +
+
+error: aborting due to 22 previous errors
Some errors have detailed explanations: E0308, E0600, E0614.
For more information about an error, try `rustc --explain E0308`.