Skip to contentSkip to conversation

rust: remove leftover mentions of the `alloc` crate

PATCH Applied Miguel Ojeda 4 participants 4 messages Mar 3, 2025 – Mar 5, 2025

Subsystems (4)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 rust: remove leftover mentions of the `alloc` crate

In commit 392e34b6bc22 ("kbuild: rust: remove the alloc crate and GlobalAlloc") we stopped using the upstream alloc crate.

Thus remove a few leftover mentions treewide.

Cc [email protected] # Also to 6.12.y after the `alloc` backport lands
Fixes 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`")
---
 Documentation/rust/quick-start.rst | 2 +-
 rust/kernel/lib.rs                 | 2 +-
 scripts/rustdoc_test_gen.rs        | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
Documentation/rust/quick-start.rst +1 -1
index 4aa50e5fcb8c..6d2607870ba4 100644
@@ -145,7 +145,7 @@ Rust standard library source
 ****************************
 
 The Rust standard library source is required because the build system will
-cross-compile ``core`` and ``alloc``.
+cross-compile ``core``.
 
 If ``rustup`` is being used, run::
 
rust/kernel/lib.rs +1 -1
index 398242f92a96..7697c60b2d1a 100644
@@ -6,7 +6,7 @@
 //! usage by Rust code in the kernel and is shared by all of them.
 //!
 //! In other words, all the rest of the Rust code in the kernel (e.g. kernel
-//! modules written in Rust) depends on [`core`], [`alloc`] and this crate.
+//! modules written in Rust) depends on [`core`] and this crate.
 //!
 //! If you need a kernel C API that is not ported or wrapped yet here, then
 //! do so first instead of bypassing this crate.
scripts/rustdoc_test_gen.rs +2 -2
index 5ebd42ae4a3f..76aaa8329413 100644
@@ -15,8 +15,8 @@
 //!   - Test code should be able to define functions and call them, without having to carry
 //!     the context.
 //!
-//!   - Later on, we may want to be able to test non-kernel code (e.g. `core`, `alloc` or
-//!     third-party crates) which likely use the standard library `assert*!` macros.
+//!   - Later on, we may want to be able to test non-kernel code (e.g. `core` or third-party
+//!     crates) which likely use the standard library `assert*!` macros.
 //!
 //! For this reason, instead of the passed context, `kunit_get_current_test()` is used instead
 //! (i.e. `current->kunit_test`).

base-commit: 7eb172143d5508b4da468ed59ee857c6e5e01da6

Signature · 1 line
2.48.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Miguel Ojeda

In commit 392e34b6bc22 ("kbuild: rust: remove the alloc crate and GlobalAlloc") we stopped using the upstream alloc crate.

Thus remove a few leftover mentions treewide.

Cc [email protected] # Also to 6.12.y after the `alloc` backport lands
Fixes 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`")

Good catch,

reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Miguel Ojeda
Quoted 8 lines · Miguel Ojeda

In commit 392e34b6bc22 ("kbuild: rust: remove the alloc crate and GlobalAlloc") we stopped using the upstream alloc crate.

Thus remove a few leftover mentions treewide.

Cc [email protected] # Also to 6.12.y after the `alloc` backport lands
Fixes 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`")

Best regards,
Andreas Hindborg

Applied
#3 lore raw
In reply to Miguel Ojeda
Quoted 9 lines · Miguel Ojeda

In commit 392e34b6bc22 ("kbuild: rust: remove the alloc crate and GlobalAlloc") we stopped using the upstream alloc crate.

Thus remove a few leftover mentions treewide.

Cc [email protected] # Also to 6.12.y after the `alloc` backport lands
Fixes 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`")

Applied to rust-fixes -- thanks everyone!

Cheers,
Miguel