Re: [PATCH 5/5] rust: pin-init: replace `addr_of_mut!` with `&raw mut`
From: Benno Lossin
Date: Thu Mar 19 2026 - 10:48:31 EST
On Thu Mar 19, 2026 at 12:07 PM CET, Gary Guo wrote:
> On Thu Mar 19, 2026 at 9:35 AM GMT, Benno Lossin wrote:
>> From: Antonio Hickey <contact@xxxxxxxxxxxxxxxxx>
>>
>> `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@xxxxxxxxxx>
>> 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@xxxxxxxxxxxxxxxxx>
>> Link: https://github.com/Rust-for-Linux/pin-init/commit/e27763004e2f6616b089437fbe9b3719cd72bd5c
>> [ Reworded commit message. - Benno ]
>> Signed-off-by: Benno Lossin <lossin@xxxxxxxxxx>
>
> Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
>
> This version looks okay to me. Why is the linked upstream version adding
> RUSTC_RAW_REF_OP_IS_STABLE cfg?
Ah good catch. That's only in the build.rs file, but it's not needed any
more, I'll remove it.
Cheers,
Benno