rust/tests/ui/enum-discriminant/auxiliary/issue-41394.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
191 B
Rust
Raw Normal View History

#![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
}