diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs index bd58c167c2e06..6c9f178250545 100644 --- a/library/core/src/ptr/alignment.rs +++ b/library/core/src/ptr/alignment.rs @@ -240,6 +240,7 @@ type AlignmentEnum = AlignmentEnum32; #[cfg(target_pointer_width = "64")] type AlignmentEnum = AlignmentEnum64; +#[cfg(target_pointer_width = "16")] #[derive(Copy, Clone, PartialEq, Eq)] #[repr(u16)] enum AlignmentEnum16 { @@ -261,6 +262,7 @@ enum AlignmentEnum16 { _Align1Shl15 = 1 << 15, } +#[cfg(target_pointer_width = "32")] #[derive(Copy, Clone, PartialEq, Eq)] #[repr(u32)] enum AlignmentEnum32 { @@ -298,6 +300,7 @@ enum AlignmentEnum32 { _Align1Shl31 = 1 << 31, } +#[cfg(target_pointer_width = "64")] #[derive(Copy, Clone, PartialEq, Eq)] #[repr(u64)] enum AlignmentEnum64 {