linux/rust
Linus Torvalds 267594792a 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.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmm1r2MACgkQGXyLc2ht
 IW17OhAAoRMLTOf/iTNu29njOtjG5iYABeC5zMnxYUErWGLOooz8D82UEiB85Whs
 uhVeW6YZ1jCcizglmbXOduKUOmSvEUYSv5/wj1w5OIF0FWW/6BA/aNdgDijHTbSU
 v/x5NfKwxZ7JD8ivl+Z7RxtA3ggEODr/pn8USIKaZr0wEjEcnP1xBedZR6+NXuBT
 CUXYm9g0BMfBbHsaI6DgD6/aj3TuHjbp1GGFlMmKd7YJGzFihhxU7nKtzkRDxAUd
 HROY1Pi+iEUXFYmeXbgObVgRqzcTYV37CkbMfPk1SoIdXXhtPcO8TJ1GguAMuVMO
 alAaVEAGFBKvnNGFoocCoxRt8U9hhiOiqlP+QMu2sbVWxWdmdBRcXlB+t4YIqFWy
 6Icp/5K8C6Tf7ZrDZhccn6T6jqp+mvNzfanppi0/DFlZiN+1oSABQgEV3YtAiEIW
 UHLT5bO5YEkHW73S9mSKhBhbH58h8IX7oGv/wteovI3gjMA9of/8/6MArWXbLpxj
 o6ws7p595/xRV+xZURm7YQm6wtbjBr4Eipgd3vIoc0Z+VbCnDLEs/n8cEYY2CtIg
 9Ze+MbBaqnf58qvhwj9Zy8ncQVnCtpQmybUE/i/YfdXo7AMsKtdUppv09xfz4fMC
 NWRqJttuWiUttGsLvi/GTxzkz5bT6Y6ZHHNqTyIKWXEIBTtRxK8=
 =7LgC
 -----END PGP SIGNATURE-----

Merge tag 'rust-fixes-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull Rust fixes from Miguel Ojeda:
 "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"

* tag 'rust-fixes-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  rust: kbuild: allow `unused_features`
  rust: cpufreq: suppress clippy::double_parens in Policy doctest
  rust: pin-init: replace shadowed return token by `unsafe`-to-create token
  rust: pin-init: internal: init: document load-bearing fact of field accessors
  rust: pin-init: internal: init: remove `#[disable_initialized_field_access]`
  rust: build: remap path to avoid absolute path
  rust: kbuild: emit dep-info into $(depfile) directly
  rust: str: make NullTerminatedFormatter public
2026-03-14 12:35:16 -07:00
..
bindings Char/Misc/IIO driver changes for 7.0-rc1 2026-02-17 09:11:04 -08:00
helpers USB / Thunderbolt changes for 7.0-rc1 2026-02-17 09:36:43 -08:00
kernel Rust fixes for v7.0 (2nd) 2026-03-14 12:35:16 -07:00
macros Rust changes for v6.20 / v7.0 2026-02-10 11:53:01 -08:00
pin-init rust: pin-init: replace shadowed return token by `unsafe`-to-create token 2026-03-12 08:46:17 +01:00
proc-macro2 rust: proc-macro2: rebuild if the version text changes 2026-01-23 10:44:27 +01:00
quote rust: quote: add `README.md` 2025-11-24 17:15:43 +01:00
syn rust: syn: add `README.md` 2025-11-24 17:15:47 +01:00
uapi Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
.kunitconfig rust: add kunitconfig 2025-03-19 23:22:21 +01:00
Makefile rust: build: remap path to avoid absolute path 2026-03-06 02:00:00 +01:00
bindgen_parameters mm: declare VMA flags by bit 2025-11-29 10:41:08 -08:00
build_error.rs rust: add `build_error` crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs ARM: 9441/1: rust: Enable Rust support for ARMv7 2025-03-26 13:31:16 +00:00
exports.c rust: exports: improve grammar in commentary 2024-10-21 17:35:33 +02:00
ffi.rs rust: replace `CStr` with `core::ffi::CStr` 2025-10-22 07:47:27 +02:00