2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-03-30 09:38:27 -04:00
|
|
|
#[derive(Copy, Clone)]
|
2013-01-04 18:43:36 -08:00
|
|
|
enum Foo {
|
|
|
|
Bar = 0xDEADBEE
|
|
|
|
}
|
|
|
|
|
2014-11-06 00:05:53 -08:00
|
|
|
static X: Foo = Foo::Bar;
|
2013-01-04 18:43:36 -08:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2015-03-25 17:06:52 -07:00
|
|
|
assert_eq!((X as usize), 0xDEADBEE);
|
|
|
|
assert_eq!((Y as usize), 0xDEADBEE);
|
2013-01-04 18:43:36 -08:00
|
|
|
}
|
2013-01-04 01:22:56 -08:00
|
|
|
|
2014-11-06 00:05:53 -08:00
|
|
|
static Y: Foo = Foo::Bar;
|