mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
12 lines
151 B
Rust
12 lines
151 B
Rust
#[repr(u8)]
|
|
enum Kind2 {
|
|
Foo() = 1,
|
|
Bar{} = 2,
|
|
Baz = 3,
|
|
}
|
|
|
|
fn main() {
|
|
let _ = Kind2::Foo() as u8;
|
|
//~^ ERROR non-primitive cast
|
|
}
|