2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2013-08-06 13:37:27 -05:00
|
|
|
enum E {
|
2015-03-25 19:06:52 -05:00
|
|
|
Foo{f : isize},
|
2013-08-06 13:37:27 -05:00
|
|
|
Bar
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
2014-11-06 02:05:53 -06:00
|
|
|
let e = E::Foo{f: 1};
|
2013-08-06 13:37:27 -05:00
|
|
|
match e {
|
2014-11-06 02:05:53 -06:00
|
|
|
E::Foo{..} => (),
|
2014-10-09 14:17:22 -05:00
|
|
|
_ => panic!(),
|
2013-08-06 13:37:27 -05:00
|
|
|
}
|
|
|
|
match e {
|
2014-11-06 02:05:53 -06:00
|
|
|
E::Foo{f: _f} => (),
|
2014-10-09 14:17:22 -05:00
|
|
|
_ => panic!(),
|
2013-08-06 13:37:27 -05:00
|
|
|
}
|
|
|
|
}
|