os-rust/tests/ui/consts/const-nullary-univariant-enum.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
225 B
Rust
Raw Normal View History

//@ run-pass
2015-03-30 09:38:27 -04:00
#[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;