mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +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
|
||
|
}
|