Skip to content

Commit

Permalink
Add proper cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
mu001999 committed Feb 28, 2024
1 parent 895dd41 commit f728c71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/core/src/ptr/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -261,6 +262,7 @@ enum AlignmentEnum16 {
_Align1Shl15 = 1 << 15,
}

#[cfg(target_pointer_width = "32")]
#[derive(Copy, Clone, PartialEq, Eq)]
#[repr(u32)]
enum AlignmentEnum32 {
Expand Down

0 comments on commit f728c71

Please sign in to comment.