Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created February 18, 2014 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bstrie/9075358 to your computer and use it in GitHub Desktop.
Save bstrie/9075358 to your computer and use it in GitHub Desktop.
repr.rs:5:5: 5:15 error: discriminant value outside specified type
repr.rs:5 Qux = 5000
^~~~~~~~~~
repr.rs:1:8: 1:10 note: discriminant type specified here
repr.rs:1 #[repr(i8)]
^~
#[repr(i8)]
enum Foo {
Bar = 0,
Baz = 127,
Qux = 5000
}
fn main() {
println!("{:i}", Qux as i8)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment