]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/rest-pat-syntactic.rs
1 // Here we test that `..` is allowed in all pattern locations *syntactically*.
2 // The semantic test is in `rest-pat-semantic-disallowed.rs`.
8 macro_rules
! accept_pat
{
22 //~^ WARN box pattern syntax is experimental
23 //~| WARN unstable syntax
40 let (..); // This is interpreted as a tuple pattern, not a parenthesis one.
41 let (..,); // Allowing trailing comma.
42 let (.., .., ..); // Duplicates also.
43 let (.., P
, ..); // Including with things in between.
45 // Tuple struct (same idea as for tuple patterns):
51 // Array/Slice (like with tuple patterns):
57 // Random walk to guard against special casing:
62 box .., //~ WARN box pattern syntax is experimental
72 //~| WARN unstable syntax