mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-25 00:02:22 +00:00
Impls for PhantomPinned
and more PhantomData
(#79)
This commit is contained in:
parent
a64046f3b8
commit
3923766b67
@ -66,6 +66,7 @@ unsafe impl<T: 'static> Pod for *const T {}
|
||||
unsafe impl<T: 'static> Pod for Option<NonNull<T>> {}
|
||||
|
||||
unsafe impl<T: Pod> Pod for PhantomData<T> {}
|
||||
unsafe impl Pod for PhantomPinned {}
|
||||
unsafe impl<T: Pod> Pod for ManuallyDrop<T> {}
|
||||
|
||||
// Note(Lokathor): MaybeUninit can NEVER be Pod.
|
||||
|
@ -59,6 +59,7 @@ unsafe impl<T> Zeroable for *mut T {}
|
||||
unsafe impl<T> Zeroable for *const T {}
|
||||
unsafe impl<T> Zeroable for Option<NonNull<T>> {}
|
||||
unsafe impl<T: Zeroable> Zeroable for PhantomData<T> {}
|
||||
unsafe impl Zeroable for PhantomPinned {}
|
||||
unsafe impl<T: Zeroable> Zeroable for ManuallyDrop<T> {}
|
||||
|
||||
#[cfg(feature = "zeroable_maybe_uninit")]
|
||||
|
Loading…
Reference in New Issue
Block a user