From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/pattern/rest-pat-syntactic.rs | 73 ------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 src/test/ui/pattern/rest-pat-syntactic.rs (limited to 'src/test/ui/pattern/rest-pat-syntactic.rs') diff --git a/src/test/ui/pattern/rest-pat-syntactic.rs b/src/test/ui/pattern/rest-pat-syntactic.rs deleted file mode 100644 index 4da5a2db7..000000000 --- a/src/test/ui/pattern/rest-pat-syntactic.rs +++ /dev/null @@ -1,73 +0,0 @@ -// Here we test that `..` is allowed in all pattern locations *syntactically*. -// The semantic test is in `rest-pat-semantic-disallowed.rs`. - -// check-pass - -fn main() {} - -macro_rules! accept_pat { - ($p:pat) => {} -} - -accept_pat!(..); - -#[cfg(FALSE)] -fn rest_patterns() { - // Top level: - fn foo(..: u8) {} - let ..; - - // Box patterns: - let box ..; - //~^ WARN box pattern syntax is experimental - //~| WARN unstable syntax - - // In or-patterns: - match x { - .. | .. => {} - } - - // Ref patterns: - let &..; - let &mut ..; - - // Ident patterns: - let x @ ..; - let ref x @ ..; - let ref mut x @ ..; - - // Tuple: - let (..); // This is interpreted as a tuple pattern, not a parenthesis one. - let (..,); // Allowing trailing comma. - let (.., .., ..); // Duplicates also. - let (.., P, ..); // Including with things in between. - - // Tuple struct (same idea as for tuple patterns): - let A(..); - let A(..,); - let A(.., .., ..); - let A(.., P, ..); - - // Array/Slice (like with tuple patterns): - let [..]; - let [..,]; - let [.., .., ..]; - let [.., P, ..]; - - // Random walk to guard against special casing: - match x { - .. | - [ - ( - box .., //~ WARN box pattern syntax is experimental - &(..), - &mut .., - x @ .. - ), - ref x @ .., - ] | - ref mut x @ .. - => {} - } - //~| WARN unstable syntax -} -- cgit v1.2.3