diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs')
-rw-r--r-- | gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs b/gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs new file mode 100644 index 0000000..40900a3 --- /dev/null +++ b/gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs @@ -0,0 +1,8 @@ +fn main() { + let x = (1, 2, 3, 4); + + match x { + (1, .., 2, 3, 4, 5) => {}, // { dg-error "expected a tuple with 4 elements, found one with 5 elements" } + _ => {} + } +}
\ No newline at end of file |