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