diff options
Diffstat (limited to 'rust/kernel')
-rw-r--r-- | rust/kernel/alloc/kbox.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/alloc/kbox.rs b/rust/kernel/alloc/kbox.rs index 9861433559dc..07150c038e3f 100644 --- a/rust/kernel/alloc/kbox.rs +++ b/rust/kernel/alloc/kbox.rs @@ -15,7 +15,7 @@ use core::pin::Pin; use core::ptr::NonNull; use core::result::Result; -use crate::init::{InPlaceWrite, Init, PinInit, Zeroable}; +use crate::init::{InPlaceWrite, Init, PinInit, ZeroableOption}; use crate::init_ext::InPlaceInit; use crate::types::ForeignOwnable; @@ -104,7 +104,7 @@ pub type KVBox<T> = Box<T, super::allocator::KVmalloc>; // // In this case we are allowed to use `T: ?Sized`, since all zeros is the `None` variant and there // is no problem with a VTABLE pointer being null. -unsafe impl<T: ?Sized, A: Allocator> Zeroable for Option<Box<T, A>> {} +unsafe impl<T: ?Sized, A: Allocator> ZeroableOption for Box<T, A> {} // SAFETY: `Box` is `Send` if `T` is `Send` because the `Box` owns a `T`. unsafe impl<T, A> Send for Box<T, A> |