]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: pin-init: replace `addr_of_mut!` with `&raw mut`
authorAntonio Hickey <contact@antoniohickey.com>
Thu, 19 Mar 2026 09:35:28 +0000 (10:35 +0100)
committerBenno Lossin <lossin@kernel.org>
Wed, 25 Mar 2026 09:57:53 +0000 (10:57 +0100)
commit09808839c7aa6695ceff5cd822c18b0d9550184d
tree3f15e58d41ef4dc65a1c3ae705220185fd736b85
parentaa9ec9460dd5c09849e09c3fac8f4286d2dc0312
rust: pin-init: replace `addr_of_mut!` with `&raw mut`

`feature(raw_ref_op)` became stable in Rust 1.82.0 which is the current
MSRV of pin-init with no default features. Earlier Rust versions will
now need to enable `raw_ref_op` to continue to work with pin-init.

This reduces visual complexity and improves consistency with existing
reference syntax.

Suggested-by: Benno Lossin <lossin@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1148
Closes: https://github.com/Rust-for-Linux/pin-init/issues/99
Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
Link: https://github.com/Rust-for-Linux/pin-init/commit/e27763004e2f6616b089437fbe9b3719cd72bd5c
[ Reworded commit message. - Benno ]
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260319093542.3756606-6-lossin@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
rust/pin-init/README.md
rust/pin-init/examples/big_struct_in_place.rs
rust/pin-init/examples/linked_list.rs
rust/pin-init/examples/mutex.rs
rust/pin-init/examples/pthread_mutex.rs
rust/pin-init/examples/static_init.rs
rust/pin-init/internal/src/init.rs
rust/pin-init/src/lib.rs