mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
16 lines
224 B
Rust
16 lines
224 B
Rust
// run-pass
|
|
|
|
#[derive(Copy, Clone)]
|
|
enum Foo {
|
|
Bar = 0xDEADBEE
|
|
}
|
|
|
|
static X: Foo = Foo::Bar;
|
|
|
|
pub fn main() {
|
|
assert_eq!((X as usize), 0xDEADBEE);
|
|
assert_eq!((Y as usize), 0xDEADBEE);
|
|
}
|
|
|
|
static Y: Foo = Foo::Bar;
|