Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: stable@vger.kernel.org # Also to 6.12.y after the `alloc` backport lands
Fixes: 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`")
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250303171030.1081134-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+4 -4
+1 -1
Documentation/rust/quick-start.rst
··· 145 145 **************************** 146 146 147 147 The Rust standard library source is required because the build system will 148 - cross-compile ``core`` and ``alloc``. 148 + cross-compile ``core``. 149 149 150 150 If ``rustup`` is being used, run:: 151 151
+1 -1
rust/kernel/lib.rs
··· 6 6 //! usage by Rust code in the kernel and is shared by all of them. 7 7 //! 8 8 //! In other words, all the rest of the Rust code in the kernel (e.g. kernel 9 - //! modules written in Rust) depends on [`core`], [`alloc`] and this crate. 9 + //! modules written in Rust) depends on [`core`] and this crate. 10 10 //! 11 11 //! If you need a kernel C API that is not ported or wrapped yet here, then 12 12 //! do so first instead of bypassing this crate.
+2 -2
scripts/rustdoc_test_gen.rs
··· 15 15 //! - Test code should be able to define functions and call them, without having to carry 16 16 //! the context. 17 17 //! 18 - //! - Later on, we may want to be able to test non-kernel code (e.g. `core`, `alloc` or 19 - //! third-party crates) which likely use the standard library `assert*!` macros. 18 + //! - Later on, we may want to be able to test non-kernel code (e.g. `core` or third-party 19 + //! crates) which likely use the standard library `assert*!` macros. 20 20 //! 21 21 //! For this reason, instead of the passed context, `kunit_get_current_test()` is used instead 22 22 //! (i.e. `current->kunit_test`).