Skip to content

Instantly share code, notes, and snippets.

/playground.rs

Last active Feb 20, 2017
Embed
What would you like to do?
Shared via Rust Playground
const BASE: u32 = 5;
#[repr(u32)]
enum Foo {
Base = BASE,
Blob,
Canvas,
}
fn main() {
println!("{} {} {}", Foo::Base as u32, Foo::Blob as u32, Foo::Canvas as u32)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.