]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-enum-struct-1.rs
Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyup
[rust.git] / src / test / ui / binding / match-enum-struct-1.rs
1 // run-pass
2 #![allow(dead_code)]
3
4 enum E {
5     Foo{f : isize},
6     Bar
7 }
8
9 pub fn main() {
10     let e = E::Foo{f: 1};
11     match e {
12         E::Foo{..} => (),
13         _ => panic!(),
14     }
15     match e {
16         E::Foo{f: _f} => (),
17         _ => panic!(),
18     }
19 }