rust/tests/ui/enum-discriminant/auxiliary/issue-41394.rs
2023-04-20 15:06:17 -03:00

17 lines
191 B
Rust

#![crate_type = "lib"]
#[repr(u32)]
pub enum Foo {
Foo = Private::Variant as u32
}
#[repr(u8)]
enum Private {
Variant = 42
}
#[inline(always)]
pub fn foo() -> Foo {
Foo::Foo
}