about summary refs log tree commit diff
path: root/tests/ui/parser/issues/issue-72373.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-08 17:18:50 +0100
committerGitHub <noreply@github.com>2024-12-08 17:18:50 +0100
commit1868c8f66f25c3493b26f23e36a861328cdedbdb (patch)
treee63475b9961590dbeb0524784d5f753160e945dd /tests/ui/parser/issues/issue-72373.rs
parentf33a8c6426074b7ce8d08740e9805fdca96ee150 (diff)
parent2459dbb4bad87c38284b0a2ba4f2d6d37db99627 (diff)
downloadrust-1868c8f66f25c3493b26f23e36a861328cdedbdb.tar.gz
rust-1868c8f66f25c3493b26f23e36a861328cdedbdb.zip
Rollup merge of #133424 - Nadrieril:guard-patterns-parsing, r=fee1-dead
Parse guard patterns

This implements the parsing of [RFC3637 Guard Patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see also [tracking issue](https://github.com/rust-lang/rust/issues/129967)). This PR is extracted from https://github.com/rust-lang/rust/pull/129996 with minor modifications.

cc `@max-niederman`
Diffstat (limited to 'tests/ui/parser/issues/issue-72373.rs')
-rw-r--r--tests/ui/parser/issues/issue-72373.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/parser/issues/issue-72373.rs b/tests/ui/parser/issues/issue-72373.rs
index 4da6061c27f..ed88d53539b 100644
--- a/tests/ui/parser/issues/issue-72373.rs
+++ b/tests/ui/parser/issues/issue-72373.rs
@@ -3,7 +3,7 @@ fn foo(c: &[u32], n: u32) -> u32 {
         [h, ..] if h > n => 0,
         [h, ..] if h == n => 1,
         [h, ref ts..] => foo(c, n - h) + foo(ts, n),
-        //~^ ERROR expected one of `,`, `@`, `]`, or `|`, found `..`
+        //~^ ERROR expected one of `,`, `@`, `]`, `if`, or `|`, found `..`
         [] => 0,
     }
 }