macro_rules! assert_align_gt { ($x:ty, $($y:ty),+ $(,)?) => { ... }; }
Expand description
Asserts that the types’ alignments are greater than each other.
Examples
A pointer has greater alignment than u16
, which has greater alignment than
u8
:
assert_align_gt!(*const u8, u16, u8);
The following example fails to compile because a usize
has the same
alignment as a pointer:
ⓘ
assert_align_gt!(*const u8, usize);