summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs')
-rw-r--r--src/test/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs b/src/test/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs
new file mode 100644
index 000000000..4c22aa2d7
--- /dev/null
+++ b/src/test/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs
@@ -0,0 +1,12 @@
+// run-pass
+pub fn main() {
+ let foo = (Some(1), (), (), vec![2, 3]);
+
+ match &foo {
+ (Some(n), .., v) => {
+ assert_eq!((*v).len(), 2);
+ assert_eq!(*n, 1);
+ }
+ (None, (), (), ..) => panic!(),
+ }
+}