Skip to content

Commit

Permalink
Merge pull request #1 from orzogc/repr
Browse files Browse the repository at this point in the history
Add `repr(transparent)` to `NonAny*`
  • Loading branch information
rick-de-water authored Nov 18, 2024
2 parents 8c9d1f8 + 3b977d0 commit 984d1c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ macro_rules! nonany {
#[doc = concat!("assert_eq!(core::mem::size_of::<Option<nonany::", stringify!($name), "<0>>>(), core::mem::size_of::<", stringify!($int), ">());")]
/// ```
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
#[repr(transparent)]
pub struct $name<const NICHE: $int>(core::num::$nonzero);

impl<const NICHE: $int> $name<NICHE> {
Expand Down

0 comments on commit 984d1c4

Please sign in to comment.