linux/rust/pin-init/internal/src
Miguel Ojeda b04d170621 pin-init changes for v6.16
Added:
 
 - 'Wrapper<T>' trait for creating pin-initializers for wrapper structs
   with a structurally pinned value such as 'UnsafeCell<T>' or
   'MaybeUninit<T>'.
 
 - 'MaybeZeroable' derive macro to try to derive 'Zeroable', but not
   error if not all fields implement it. This is needed to derive
   'Zeroable' for all bindgen-generated structs.
 
 - 'unsafe fn cast_[pin_]init()' functions to unsafely change the
   initialized type of an initializer. These are utilized by the
   'Wrapper<T>' implementations.
 
 Changed:
 
 - Added support for visibility in 'Zeroable' derive macro.
 
 - Added support for 'union's in 'Zeroable' derive macro.
 
 Upstream dev news:
 
 - The CI has been streamlined & some bugs with it have been fixed. I
   also added new workflows to check if the user-space version and the
   one in the kernel tree have diverged.
 
 - I also started to use the issues [1] tab to keep track of any problems
   or unexpected/unwanted things. This should help folks report and
   diagnose issues w.r.t. 'pin-init' better.
 
 [1]: https://github.com/rust-for-linux/pin-init/issues
 -----BEGIN PGP SIGNATURE-----
 
 iIgEABYKADAWIQQjEG/HT3UeYLJybLTomd21rZaLygUCaBkpnxIcbG9zc2luQGtl
 cm5lbC5vcmcACgkQ6Jndta2Wi8rvGAEAlmQercahKos8nEIvsP53vckky2OI7NWi
 /1IjnFqIx0ABAJ4Wm08BDTU3tVOI7hNWIlZbWm0U81+Alk5fgR+Ou30F
 =ZfOJ
 -----END PGP SIGNATURE-----

Merge tag 'pin-init-v6.16' of https://github.com/Rust-for-Linux/linux into rust-next

Pull pin-init updates from Benno Lossin:
 "Added:

   - 'Wrapper<T>' trait for creating pin-initializers for wrapper
     structs with a structurally pinned value such as 'UnsafeCell<T>' or
     'MaybeUninit<T>'.

   - 'MaybeZeroable' derive macro to try to derive 'Zeroable', but not
     error if not all fields implement it. This is needed to derive
     'Zeroable' for all bindgen-generated structs.

   - 'unsafe fn cast_[pin_]init()' functions to unsafely change the
     initialized type of an initializer. These are utilized by the
     'Wrapper<T>' implementations.

  Changed:

   - Added support for visibility in 'Zeroable' derive macro.

   - Added support for 'union's in 'Zeroable' derive macro.

  Upstream dev news:

   - The CI has been streamlined & some bugs with it have been fixed. I
     also added new workflows to check if the user-space version and the
     one in the kernel tree have diverged.

   - I also started to use the issues [1] tab to keep track of any
     problems or unexpected/unwanted things. This should help folks
     report and diagnose issues w.r.t. 'pin-init' better.

      [1] https://github.com/rust-for-linux/pin-init/issues"

* tag 'pin-init-v6.16' of https://github.com/Rust-for-Linux/linux:
  rust: pin-init: improve documentation for `Zeroable` derive macros
  rust: pin-init: fix typos
  rust: pin-init: add `MaybeZeroable` derive macro
  rust: pin-init: allow `Zeroable` derive macro to also be applied to unions
  rust: pin-init: allow `pub` fields in `derive(Zeroable)`
  rust: pin-init: Update the structural pinning link in readme.
  rust: pin-init: Update Changelog and Readme
  rust: pin-init: Implement `Wrapper` for `UnsafePinned` behind feature flag.
  rust: pin-init: Add the `Wrapper` trait.
  rust: pin-init: add `cast_[pin_]init` functions to change the initialized type
  rust: pin-init: examples: use `allow` instead of `expect`
  rust: pin-init: examples: conditionally enable `feature(lint_reasons)`
  rust: pin-init: internal: skip rustfmt formatting of kernel-only module
  rust: pin-init: synchronize README.md
2025-05-18 20:42:49 +02:00
..
helpers.rs rust: pin-init: internal: synchronize with user-space version 2025-03-16 21:59:19 +01:00
lib.rs rust: pin-init: add MaybeZeroable derive macro 2025-05-01 18:15:26 +02:00
pin_data.rs rust: pin-init: internal: synchronize with user-space version 2025-03-16 21:59:19 +01:00
pinned_drop.rs rust: clean Rust 1.88.0's clippy::uninlined_format_args lint 2025-05-07 00:11:47 +02:00
zeroable.rs rust: pin-init: add MaybeZeroable derive macro 2025-05-01 18:15:26 +02:00