]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/repr/aligned_enum_cast.rs
2 // allows aligned custom discriminant enums to cast into other types
3 // See the issue #92464 for more info
12 let aligned
= Aligned
::Zero
;
13 let fo
= aligned
as u8;
14 println
!("foo {}", fo
);
16 println
!("{}", tou8(Aligned
::Zero
));
17 assert_eq
!(tou8(Aligned
::Zero
), 0);
21 fn tou8(al
: Aligned
) -> u8 {
22 // Cast behind a function call so ConstProp does not see it
23 // (so that we can test codegen).