Merge branch 'main' of https://github.com/Lokathor/bytemuck into main

This commit is contained in:
Lokathor 2021-12-15 23:16:42 -07:00
commit c8ffbd19dd
2 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ unsafe impl<T: 'static> Pod for *const T {}
unsafe impl<T: 'static> Pod for Option<NonNull<T>> {} unsafe impl<T: 'static> Pod for Option<NonNull<T>> {}
unsafe impl<T: Pod> Pod for PhantomData<T> {} unsafe impl<T: Pod> Pod for PhantomData<T> {}
unsafe impl Pod for PhantomPinned {}
unsafe impl<T: Pod> Pod for ManuallyDrop<T> {} unsafe impl<T: Pod> Pod for ManuallyDrop<T> {}
// Note(Lokathor): MaybeUninit can NEVER be Pod. // Note(Lokathor): MaybeUninit can NEVER be Pod.

View File

@ -59,6 +59,7 @@ unsafe impl<T> Zeroable for *mut T {}
unsafe impl<T> Zeroable for *const T {} unsafe impl<T> Zeroable for *const T {}
unsafe impl<T> Zeroable for Option<NonNull<T>> {} unsafe impl<T> Zeroable for Option<NonNull<T>> {}
unsafe impl<T: Zeroable> Zeroable for PhantomData<T> {} unsafe impl<T: Zeroable> Zeroable for PhantomData<T> {}
unsafe impl Zeroable for PhantomPinned {}
unsafe impl<T: Zeroable> Zeroable for ManuallyDrop<T> {} unsafe impl<T: Zeroable> Zeroable for ManuallyDrop<T> {}
#[cfg(feature = "zeroable_maybe_uninit")] #[cfg(feature = "zeroable_maybe_uninit")]