about summary refs log tree commit diff
path: root/tests/ui/parser/expr-as-stmt.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/expr-as-stmt.fixed')
-rw-r--r--tests/ui/parser/expr-as-stmt.fixed11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/ui/parser/expr-as-stmt.fixed b/tests/ui/parser/expr-as-stmt.fixed
index 0a4d62a4a0c..bfae55047ed 100644
--- a/tests/ui/parser/expr-as-stmt.fixed
+++ b/tests/ui/parser/expr-as-stmt.fixed
@@ -66,7 +66,7 @@ fn asteroids() -> impl FnOnce() -> bool {
 
 // https://github.com/rust-lang/rust/issues/105179
 fn r#match() -> i32 {
-    (match () { () => 1 }) + match () { () => 1 } //~ ERROR expected expression, found `+`
+    ((match () { () => 1 })) + match () { () => 1 } //~ ERROR expected expression, found `+`
     //~^ ERROR mismatched types
 }
 
@@ -76,4 +76,13 @@ fn r#unsafe() -> i32 {
     //~^ ERROR mismatched types
 }
 
+// https://github.com/rust-lang/rust/issues/88727
+fn matches() -> bool {
+    (match () { _ => true }) && match () { _ => true }; //~ ERROR mismatched types
+    (match () { _ => true }) && match () { _ => true }; //~ ERROR mismatched types
+    //~^ ERROR expected `;`, found keyword `match`
+    (match () { _ => true }) && true; //~ ERROR mismatched types
+    ((match () { _ => true })) && true //~ ERROR mismatched types
+    //~^ ERROR mismatched types
+}
 fn main() {}