diff options
| author | Gary Guo <gary@garyguo.net> | 2026-03-19 10:35:24 +0100 |
|---|---|---|
| committer | Benno Lossin <lossin@kernel.org> | 2026-03-25 10:56:16 +0100 |
| commit | 002a121b16c3a20c6e0ff24fc8dad6dab59730f9 (patch) | |
| tree | a946dd80194bb0bfb6ce8f97350ff156cc240b14 /rust/kernel/alloc/kvec/errors.rs | |
| parent | f338e77383789c0cae23ca3d48adcc5e9e137e3c (diff) | |
rust: pin-init: build: simplify use of nightly features
We use some features that are already stable in later versions of Rust,
but only available as unstable features in older Rust versions that the
kernel needs to support.
Instead of checking if a feature is already stable, simply enable them
and allow the warning if the feature is already stable. This avoids the
need of hardcoding whether a feature has been stabilized at a given
version.
`#[feature(...)]` is used when cfg `USE_RUSTC_FEATURES` is enabled. The
build script automatically does this when a nightly compiler is detected
or `RUSTC_BOOTSTRAP` is set.
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://github.com/Rust-for-Linux/pin-init/commit/885c5d83d7eb778a796d4a17380a0898b0d0a571
[ Added kernel build system changes to always enable USE_RUSTC_FEATURES.
Moved this commit earlier (swapped with the next one) to avoid a build
error. - Benno ]
Link: https://patch.msgid.link/20260319093542.3756606-2-lossin@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
