mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-21 22:32:23 +00:00
opt-in zeroable for maybe_unint
This commit is contained in:
parent
6414f14815
commit
4d819357ba
@ -15,6 +15,7 @@ exclude = ["/pedantic.bat"]
|
||||
# Note: Yeah these names are non-standard, we'll fix it in v2 some day maybe
|
||||
extern_crate_alloc = []
|
||||
extern_crate_std = ["extern_crate_alloc"]
|
||||
zeroable_maybe_uninit = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -61,8 +61,8 @@ unsafe impl<T> Zeroable for Option<NonNull<T>> {}
|
||||
unsafe impl<T: Zeroable> Zeroable for PhantomData<T> {}
|
||||
unsafe impl<T: Zeroable> Zeroable for ManuallyDrop<T> {}
|
||||
|
||||
// 2.0: add MaybeUninit
|
||||
//unsafe impl<T> Zeroable for MaybeUninit<T> {}
|
||||
#[cfg(feature = "zeroable_maybe_uninit")]
|
||||
unsafe impl<T> Zeroable for core::mem::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