diff options
| author | Lieselotte <52315535+she3py@users.noreply.github.com> | 2024-01-28 16:12:21 +0100 |
|---|---|---|
| committer | Lieselotte <52315535+she3py@users.noreply.github.com> | 2024-01-28 16:12:21 +0100 |
| commit | 6f014a81b2466c2abdae4c06ff81fae7e1bc006c (patch) | |
| tree | 338c16a2576e619cc2d21a902423541a0d30b88a /tests/ui/parser/pat-ranges-3.rs | |
| parent | 635124704849eeead4e3a7bb6e663c5351571d93 (diff) | |
| download | rust-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.rs | 6 |
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 } |
