Rust fixes for 7.0 (2nd)
Miguel Ojeda
maintainerHi Linus,
Please pull these fixes for Rust.
The top commit has only been in linux-next for one round, but most have been for more than a week. They can all wait one more week if needed.
No conflicts expected.
Thanks!
Cheers,
Miguel
The following changes since commit 11439c4635edd669ae435eec308f4ab8a0804808:
Linux 7.0-rc2 (2026-03-01 15:39:31 -0800)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.0-2
for you to fetch changes up to 592c61f3bfceaa29f8275696bd67c3dfad7ef72e:
rust: kbuild: allow unused_features (2026-03-12 15:15:16 +0100)
----------------------------------------------------------------
Rust fixes for v7.0 (2nd)
Toolchain and infrastructure:
- Remap paths to avoid absolute ones starting with the upcoming Rust 1.95.0 release. This improves build reproducibility, avoids leaking the exact path and avoids having the same path appear in two forms.
The approach here avoids remapping debug information as well, in order to avoid breaking tools that used the paths to access source files, which was the previous attempt that needed to be reverted.
- Allow 'unused_features' lint for the upcoming Rust 1.96.0 release. While well-intentioned, we do not benefit much from the new lint.
- Emit dependency information into '$(depfile)' directly to avoid a temporary '.d' file (it was an old approach).
'kernel' crate:
- 'str' module: fix warning under '!CONFIG_BLOCK' by making 'NullTerminatedFormatter' public.
- 'cpufreq' module: suppress false positive Clippy warning.
'pin-init' crate:
- Remove '#[disable_initialized_field_access]' attribute which was unsound. This means removing the support for structs with unaligned fields (through the 'repr(packed)' attribute), for now.
And document the load-bearing fact of field accessors (i.e. that they are required for soundness).
- Replace shadowed return token by 'unsafe'-to-create token in order to remain sound in the face of the likely upcoming Type Alias Impl Trait (TAIT) and the next trait solver in upstream Rust.
----------------------------------------------------------------
Alexandre Courbot (1):
rust: str: make NullTerminatedFormatter public
Benno Lossin (3):
rust: pin-init: internal: init: remove #[disable_initialized_field_access]
rust: pin-init: internal: init: document load-bearing fact of field accessors
rust: pin-init: replace shadowed return token by unsafe-to-create token
Gary Guo (2):
rust: kbuild: emit dep-info into $(depfile) directly
rust: build: remap path to avoid absolute path
John Hubbard (1):
rust: cpufreq: suppress clippy::double_parens in Policy doctest
Miguel Ojeda (1):
rust: kbuild: allow unused_features
Makefile | 4 +++ rust/Makefile | 11 +++--- rust/kernel/cpufreq.rs | 1 + rust/kernel/str.rs | 4 +-- rust/pin-init/internal/src/init.rs | 69 +++++++++++++------------------------- rust/pin-init/src/__internal.rs | 28 +++++++++++++--- 6 files changed, 59 insertions(+), 58 deletions(-)
The pull request you sent on Sat, 14 Mar 2026 19:59:40 +0100:
The pull request you sent on Sat, 14 Mar 2026 19:59:40 +0100:
Quoted 1 line
https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.0-2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/267594792a71018788af69e836c52e34bb8054af
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html