rust/tests/ui/cast/issue-88621.rs
2023-01-11 09:32:08 +00:00

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
}