mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +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
|
|
}
|