summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/tuple-struct-matching.rs
blob: 432be1d1f7a03f30f1c56251cd306322a887b96d (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);
        }
    }
}