From: Jimmy Ostler Date: Fri, 20 Dec 2024 06:25:31 +0000 (-0800) Subject: rust: error: import `kernel`'s `LayoutError` instead of `core`'s X-Git-Tag: v6.14-rc1~172^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7871c612cade8943694cc254740a374e3fb42a7c;p=thirdparty%2Fkernel%2Flinux.git rust: error: import `kernel`'s `LayoutError` instead of `core`'s Import the internal (`kernel::alloc`) version of `LayoutError` instead of the `core::alloc` one. In particular, this results in switching the type in the existing `From for Error` implementation. Acked-by: Danilo Krummrich Signed-off-by: Jimmy Ostler Link: https://lore.kernel.org/r/fe58a02189e8804a9eabdd01cb1927d4c491d79c.1734674670.git.jtostler1@gmail.com [ Reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda --- diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs index 914e8dec1abd7..f6ecf09cb65f4 100644 --- a/rust/kernel/error.rs +++ b/rust/kernel/error.rs @@ -4,9 +4,10 @@ //! //! C header: [`include/uapi/asm-generic/errno-base.h`](srctree/include/uapi/asm-generic/errno-base.h) -use crate::{alloc::AllocError, str::CStr}; - -use core::alloc::LayoutError; +use crate::{ + alloc::{layout::LayoutError, AllocError}, + str::CStr, +}; use core::fmt; use core::num::NonZeroI32;