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