summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rust/kernel/init.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs
index a1298c8bbda0..4ebfb08dab11 100644
--- a/rust/kernel/init.rs
+++ b/rust/kernel/init.rs
@@ -1190,8 +1190,8 @@ pub fn uninit<T, E>() -> impl Init<MaybeUninit<T>, E> {
}
// SAFETY: Every type can be initialized by-value.
-unsafe impl<T> Init<T> for T {
- unsafe fn __init(self, slot: *mut T) -> Result<(), Infallible> {
+unsafe impl<T, E> Init<T, E> for T {
+ unsafe fn __init(self, slot: *mut T) -> Result<(), E> {
unsafe { slot.write(self) };
Ok(())
}