diff mbox series

[6.12.y,41/60] rust: error: use `core::alloc::LayoutError`

Message ID 20250307225008.779961-42-ojeda@kernel.org
State New
Headers show
Series `alloc`, `#[expect]` and "Custom FFI" | expand

Commit Message

Miguel Ojeda March 7, 2025, 10:49 p.m. UTC
From: Danilo Krummrich <dakr@kernel.org>

commit 29a48d25ff53c183482dc88a99133a0fb5aa541a upstream.

Use `core::alloc::LayoutError` instead of `alloc::alloc::LayoutError` in
preparation to get rid of Rust's alloc crate.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20241004154149.93856-23-dakr@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/kernel/error.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
index be6509d5f4a4..aced2fe68b86 100644
--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -6,7 +6,7 @@ 
 
 use crate::{alloc::AllocError, str::CStr};
 
-use alloc::alloc::LayoutError;
+use core::alloc::LayoutError;
 
 use core::fmt;
 use core::num::NonZeroI32;