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: kbuild: remove `feature(...)`s that are now stable

Now that the Rust minimum version is 1.85.0, there is no need to enable
certain features that are stable.

Thus clean them up.

Reviewed-by: Tamir Duberstein <tamird@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260405235309.418950-13-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+1 -28
-2
rust/Makefile
··· 86 86 wrap_proc_macro \ 87 87 $(if $(call rustc-min-version,108800),proc_macro_span_file proc_macro_span_location) 88 88 89 - # Stable since Rust 1.79.0: `feature(proc_macro_byte_character,proc_macro_c_str_literals)`. 90 89 proc_macro2-flags := \ 91 90 --cap-lints=allow \ 92 - -Zcrate-attr='feature(proc_macro_byte_character,proc_macro_c_str_literals)' \ 93 91 $(call cfgs-to-flags,$(proc_macro2-cfgs)) 94 92 95 93 quote-cfgs := \
-21
rust/kernel/lib.rs
··· 16 16 // Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on 17 17 // the unstable features in use. 18 18 // 19 - // Stable since Rust 1.79.0. 20 - #![feature(generic_nonzero)] 21 - #![feature(inline_const)] 22 - #![feature(pointer_is_aligned)] 23 - // 24 - // Stable since Rust 1.80.0. 25 - #![feature(slice_flatten)] 26 - // 27 - // Stable since Rust 1.81.0. 28 - #![feature(lint_reasons)] 29 - // 30 - // Stable since Rust 1.82.0. 31 - #![feature(raw_ref_op)] 32 - // 33 - // Stable since Rust 1.83.0. 34 - #![feature(const_maybe_uninit_as_mut_ptr)] 35 - #![feature(const_mut_refs)] 36 - #![feature(const_option)] 37 - #![feature(const_ptr_write)] 38 - #![feature(const_refs_to_cell)] 39 - // 40 19 // Expected to become stable. 41 20 #![feature(arbitrary_self_types)] 42 21 #![feature(derive_coerce_pointee)]
+1 -5
scripts/Makefile.build
··· 310 310 311 311 # The features in this list are the ones allowed for non-`rust/` code. 312 312 # 313 - # - Stable since Rust 1.79.0: `feature(inline_const)`. 314 - # - Stable since Rust 1.81.0: `feature(lint_reasons)`. 315 - # - Stable since Rust 1.82.0: `feature(asm_const)`, 316 - # `feature(offset_of_nested)`, `feature(raw_ref_op)`. 317 313 # - Stable since Rust 1.87.0: `feature(asm_goto)`. 318 314 # - Expected to become stable: `feature(arbitrary_self_types)`. 319 315 # - To be determined: `feature(used_with_arg)`. 320 316 # 321 317 # Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on 322 318 # the unstable features in use. 323 - rust_allowed_features := asm_const,asm_goto,arbitrary_self_types,inline_const,lint_reasons,offset_of_nested,raw_ref_op,used_with_arg 319 + rust_allowed_features := arbitrary_self_types,asm_goto,used_with_arg 324 320 325 321 # `--out-dir` is required to avoid temporaries being created by `rustc` in the 326 322 # current working directory, which may be not accessible in the out-of-tree