summary refs log tree commit diff
path: root/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs
blob: 9ad95e274b7ee1662500754b0fecf69dbce1c3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
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!(),
    }
}