about summary refs log tree commit diff
path: root/tests/ui/parser/pat-ranges-3.rs
diff options
context:
space:
mode:
authorLieselotte <52315535+she3py@users.noreply.github.com>2024-01-28 16:12:21 +0100
committerLieselotte <52315535+she3py@users.noreply.github.com>2024-01-28 16:12:21 +0100
commit6f014a81b2466c2abdae4c06ff81fae7e1bc006c (patch)
tree338c16a2576e619cc2d21a902423541a0d30b88a /tests/ui/parser/pat-ranges-3.rs
parent635124704849eeead4e3a7bb6e663c5351571d93 (diff)
downloadrust-6f014a81b2466c2abdae4c06ff81fae7e1bc006c.tar.gz
rust-6f014a81b2466c2abdae4c06ff81fae7e1bc006c.zip
Handle methodcalls & operators in patterns
Diffstat (limited to 'tests/ui/parser/pat-ranges-3.rs')
-rw-r--r--tests/ui/parser/pat-ranges-3.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/parser/pat-ranges-3.rs b/tests/ui/parser/pat-ranges-3.rs
index 8976dcf0d90..419768a2a20 100644
--- a/tests/ui/parser/pat-ranges-3.rs
+++ b/tests/ui/parser/pat-ranges-3.rs
@@ -1,5 +1,9 @@
 // Parsing of range patterns
 
 fn main() {
-    let 10 ..= 10 + 3 = 12; //~ expected one of `:`, `;`, `=`, or `|`, found `+`
+    let 10 ..= 10 + 3 = 12;
+    //~^ error: expected a pattern range bound, found an expression
+
+    let 10 - 3 ..= 10 = 8;
+    //~^ error: expected a pattern range bound, found an expression
 }