about summary refs log tree commit diff
path: root/tests/ui/binding/match-enum-struct-1.rs
blob: 57801346905637cacb68a64b7b0afa946c2f9c44 (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!(),
    }
}