mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
rust: clarify the language unstable features in use
We track the details of which Rust features we use at our usual "live list" [1] (and its sub-lists), but in light of a discussion in the LWN article [2], it would help to clarify it in the source code. In particular, we are very close to rely only on stable Rust language-wise -- essentially only two language features remain (including the `kernel` crate). Thus add some details in both the feature list of the `kernel` crate as well as the list of allowed features. This does not over every single feature, and there are quite a few non-language features that we use too. To have the full picture, please refer to [1]. Link: https://github.com/Rust-for-Linux/linux/issues/2 [1] Link: https://lwn.net/Articles/1015409/ [2] Suggested-by: Andreas Hindborg <a.hindborg@kernel.org> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/20250327211302.286313-1-ojeda@kernel.org [ Improved comments with suggestions from the list. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
@@ -222,6 +222,15 @@ $(obj)/%.lst: $(obj)/%.c FORCE
|
||||
# Compile Rust sources (.rs)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# The features in this list are the ones allowed for non-`rust/` code.
|
||||
#
|
||||
# - Stable since Rust 1.81.0: `feature(lint_reasons)`.
|
||||
# - Stable since Rust 1.82.0: `feature(asm_const)`, `feature(raw_ref_op)`.
|
||||
# - Stable since Rust 1.87.0: `feature(asm_goto)`.
|
||||
# - Expected to become stable: `feature(arbitrary_self_types)`.
|
||||
#
|
||||
# Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on
|
||||
# the unstable features in use.
|
||||
rust_allowed_features := asm_const,asm_goto,arbitrary_self_types,lint_reasons,raw_ref_op
|
||||
|
||||
# `--out-dir` is required to avoid temporaries being created by `rustc` in the
|
||||
|
||||
Reference in New Issue
Block a user