* [PATCH] rust: alloc: fix missing import needed for `rusttest`
@ 2025-08-16 21:02 Miguel Ojeda
2025-08-17 8:32 ` Alice Ryhl
0 siblings, 1 reply; 2+ messages in thread
From: Miguel Ojeda @ 2025-08-16 21:02 UTC (permalink / raw)
To: Andrew Morton, Vitaly Wool, Alice Ryhl, Danilo Krummrich,
Miguel Ojeda, Alex Gaynor
Cc: Lorenzo Stoakes, Liam R . Howlett, linux-mm, rust-for-linux,
Vlastimil Babka, Uladzislau Rezki, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Trevor Gross, linux-kernel, patches
There is a missing import of `NumaNode` that is used in the `rusttest`
target:
error[E0412]: cannot find type `NumaNode` in this scope
--> rust/kernel/alloc/allocator_test.rs:43:15
|
43 | _nid: NumaNode,
| ^^^^^^^^ not found in this scope
|
help: consider importing this struct
|
12 + use crate::alloc::NumaNode;
|
Thus fix it by adding it.
Fixes: 8405eafa6e94 ("rust: add support for NUMA ids in allocations")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
akpm: please feel free to rebase this into the patch directly if that is
simpler/preferred.
We are looking into removing this file, possibly this cycle, so it is
not a big deal but meanwhile it would be nice to keep the branch clean
nevertheless.
rust/kernel/alloc/allocator_test.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/alloc/allocator_test.rs b/rust/kernel/alloc/allocator_test.rs
index 283c02376458..13435ef8e652 100644
--- a/rust/kernel/alloc/allocator_test.rs
+++ b/rust/kernel/alloc/allocator_test.rs
@@ -9,7 +9,7 @@
#![allow(missing_docs)]
-use super::{flags::*, AllocError, Allocator, Flags};
+use super::{flags::*, AllocError, Allocator, Flags, NumaNode};
use core::alloc::Layout;
use core::cmp;
use core::ptr;
--
2.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rust: alloc: fix missing import needed for `rusttest`
2025-08-16 21:02 [PATCH] rust: alloc: fix missing import needed for `rusttest` Miguel Ojeda
@ 2025-08-17 8:32 ` Alice Ryhl
0 siblings, 0 replies; 2+ messages in thread
From: Alice Ryhl @ 2025-08-17 8:32 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Andrew Morton, Vitaly Wool, Danilo Krummrich, Alex Gaynor,
Lorenzo Stoakes, Liam R . Howlett, linux-mm, rust-for-linux,
Vlastimil Babka, Uladzislau Rezki, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Trevor Gross, linux-kernel, patches
On Sat, Aug 16, 2025 at 11:02 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> There is a missing import of `NumaNode` that is used in the `rusttest`
> target:
>
> error[E0412]: cannot find type `NumaNode` in this scope
> --> rust/kernel/alloc/allocator_test.rs:43:15
> |
> 43 | _nid: NumaNode,
> | ^^^^^^^^ not found in this scope
> |
> help: consider importing this struct
> |
> 12 + use crate::alloc::NumaNode;
> |
>
> Thus fix it by adding it.
>
> Fixes: 8405eafa6e94 ("rust: add support for NUMA ids in allocations")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Acked-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-17 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16 21:02 [PATCH] rust: alloc: fix missing import needed for `rusttest` Miguel Ojeda
2025-08-17 8:32 ` Alice Ryhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).