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

Configure Feed

Select the types of activity you want to include in your feed.

rust: pin-init: feature-gate the `stack_init_reuse` test on the `std` feature

When trying to run `cargo check --all-targets --no-default-features`, an
error is reported by the test, as it cannot find the `std` crate. This
is to be expected, since the `--no-default-features` flag enables the
`no-std` behavior of the crate. Thus exclude the test in that scenario.

Link: https://github.com/Rust-for-Linux/pin-init/pull/50/commits/2813729ccacdedee9dbfcab1ed285b8721a0391b
Link: https://lore.kernel.org/all/20250523125424.192843-4-lossin@kernel.org
[ Changed my author email address to @kernel.org. - Benno ]
Signed-off-by: Benno Lossin <lossin@kernel.org>

+1
+1
rust/pin-init/src/__internal.rs
··· 188 188 } 189 189 190 190 #[test] 191 + #[cfg(feature = "std")] 191 192 fn stack_init_reuse() { 192 193 use ::std::{borrow::ToOwned, println, string::String}; 193 194 use core::pin::pin;