diff options
| author | Antonio Hickey <contact@antoniohickey.com> | 2026-03-19 10:35:28 +0100 |
|---|---|---|
| committer | Benno Lossin <lossin@kernel.org> | 2026-03-25 10:57:53 +0100 |
| commit | 09808839c7aa6695ceff5cd822c18b0d9550184d (patch) | |
| tree | 3f15e58d41ef4dc65a1c3ae705220185fd736b85 /rust/pin-init/examples/static_init.rs | |
| parent | aa9ec9460dd5c09849e09c3fac8f4286d2dc0312 (diff) | |
| download | linux-next-09808839c7aa6695ceff5cd822c18b0d9550184d.tar.gz linux-next-09808839c7aa6695ceff5cd822c18b0d9550184d.zip | |
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>
Diffstat (limited to 'rust/pin-init/examples/static_init.rs')
| -rw-r--r-- | rust/pin-init/examples/static_init.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/pin-init/examples/static_init.rs b/rust/pin-init/examples/static_init.rs index df562134a53c..f7e53d1a5ae6 100644 --- a/rust/pin-init/examples/static_init.rs +++ b/rust/pin-init/examples/static_init.rs @@ -3,6 +3,7 @@ #![allow(clippy::undocumented_unsafe_blocks)] #![cfg_attr(feature = "alloc", feature(allocator_api))] #![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] +#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] #![allow(unused_imports)] use core::{ |
