]> git.lizzy.rs Git - rust.git/blob - src/test/ui/enum/enum-discrim-autosizing.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / enum / enum-discrim-autosizing.rs
1 // With no repr attribute the discriminant will default to isize.
2 // On 32-bit architectures this is equivalent to i32 so the variants
3 // collide. On other architectures we need compilation to fail anyway,
4 // so force the repr.
5 #[cfg_attr(not(target_pointer_width = "32"), repr(i32))]
6 enum Eu64 {
7     Au64 = 0,
8     Bu64 = 0x8000_0000_0000_0000 //~ERROR already exists
9 }
10
11 fn main() {}