Implement Zeroable on UnsafeCell<impl Zeroable> (#148)

This commit is contained in:
yvt 2022-11-21 08:40:41 +09:00 committed by GitHub
parent c9e1ae1373
commit 0da8f3a28f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,7 @@ unsafe impl<T> Zeroable for *const 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 core::cell::UnsafeCell<T> {}
#[cfg(feature = "zeroable_maybe_uninit")]
unsafe impl<T> Zeroable for core::mem::MaybeUninit<T> {}