summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs
blob: 4c22aa2d71816e29bc77092ba3aba767728613ae (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!(),
    }
}