Skip to content

Instantly share code, notes, and snippets.

@nodakai
Created February 10, 2016 22:04
Show Gist options
  • Select an option

  • Save nodakai/0b517fdb5d678398f7a4 to your computer and use it in GitHub Desktop.

Select an option

Save nodakai/0b517fdb5d678398f7a4 to your computer and use it in GitHub Desktop.
#[repr(i64)]
enum E0 {
A = 18446744073709551615,
B = 18446744073709551614
}
/*
#[repr(i8)]
enum E1 {
A = 256,
B = 255
}
*/
fn main() {
println!("{} {}", E0::A as i64, E0::B as u64);
// println!("{}", E1::A as i8);
let _: u64 = 1 << 63;
println!("{}", 1i64 << 63);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment