mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-21 22:32:23 +00:00
MaybeUninit has to wait for later.
This commit is contained in:
parent
37380f8867
commit
de517daffa
@ -8,3 +8,7 @@
|
||||
# bytemuck
|
||||
|
||||
A crate for mucking around with piles of bytes.
|
||||
|
||||
## Stability
|
||||
|
||||
The goal is to stay at 1.0 until at least the next edition of Rust.
|
||||
|
@ -62,6 +62,8 @@ unsafe impl<T: 'static> Pod for Option<NonNull<T>> {}
|
||||
unsafe impl<T: Pod> Pod for PhantomData<T> {}
|
||||
unsafe impl<T: Pod> Pod for ManuallyDrop<T> {}
|
||||
|
||||
// Note(Lokathor): MaybeUninit can NEVER be Pod.
|
||||
|
||||
impl_unsafe_marker_for_array!(
|
||||
Pod, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 48, 64, 96, 128, 256,
|
||||
|
@ -60,7 +60,9 @@ 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<T: Zeroable> Zeroable for ManuallyDrop<T> {}
|
||||
unsafe impl<T> Zeroable for MaybeUninit<T> {}
|
||||
|
||||
// 2.0: add MaybeUninit
|
||||
//unsafe impl<T> Zeroable for MaybeUninit<T> {}
|
||||
|
||||
unsafe impl<A: Zeroable> Zeroable for (A,) {}
|
||||
unsafe impl<A: Zeroable, B: Zeroable> Zeroable for (A, B) {}
|
||||
|
Loading…
Reference in New Issue
Block a user