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