summaryrefslogtreecommitdiffstats
path: root/tests/ui/binding/match-enum-struct-1.rs
blob: f035432ec99b808f27fc249452df547d22c3fcfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-pass
#![allow(dead_code)]

enum E {
    Foo{f : isize},
    Bar
}

pub fn main() {
    let e = E::Foo{f: 1};
    match e {
        E::Foo{..} => (),
        _ => panic!(),
    }
    match e {
        E::Foo{f: _f} => (),
        _ => panic!(),
    }
}