]> git.lizzy.rs Git - rust.git/blob - src/test/ui/aligned_enum_cast.rs
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / aligned_enum_cast.rs
1 // run-pass
2 // allows aligned custom discriminant enums to cast into other types
3 // See the issue #92464 for more info
4 #[allow(dead_code)]
5 #[repr(align(8))]
6 enum Aligned {
7     Zero = 0,
8     One = 1,
9 }
10
11 fn main() {
12     let aligned = Aligned::Zero;
13     let fo = aligned as u8;
14     println!("foo {}",fo);
15 }