about summary refs log tree commit diff
path: root/tests/ui/structs-enums/tuple-struct-matching.rs
blob: a5436624c658a43767622807c46c5d11af0e564c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-pass
struct Foo(isize, isize);

pub fn main() {
    let x = Foo(1, 2);
    match x {
        Foo(a, b) => {
            assert_eq!(a, 1);
            assert_eq!(b, 2);
            println!("{} {}", a, b);
        }
    }
}