2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
enum E { V1(isize), V0 }
|
2014-12-19 20:20:51 -06:00
|
|
|
static C: [E; 3] = [E::V0, E::V1(0xDEADBEE), E::V0];
|
2013-01-30 18:36:07 -06:00
|
|
|
|
2013-02-17 16:36:43 -06:00
|
|
|
pub fn main() {
|
2013-01-30 18:36:07 -06:00
|
|
|
match C[1] {
|
2015-06-07 13:00:38 -05:00
|
|
|
E::V1(n) => assert_eq!(n, 0xDEADBEE),
|
2014-10-09 14:17:22 -05:00
|
|
|
_ => panic!()
|
2013-01-30 18:36:07 -06:00
|
|
|
}
|
2013-05-03 18:25:04 -05:00
|
|
|
match C[2] {
|
2014-11-06 02:05:53 -06:00
|
|
|
E::V0 => (),
|
2014-10-09 14:17:22 -05:00
|
|
|
_ => panic!()
|
2013-01-30 18:36:07 -06:00
|
|
|
}
|
|
|
|
}
|