Skip to content

refactor to use &raw mut#105

Merged
BennoLossin merged 1 commit intoRust-for-Linux:mainfrom
antonio-hickey:alt-unstable-feauture
Mar 8, 2026
Merged

refactor to use &raw mut#105
BennoLossin merged 1 commit intoRust-for-Linux:mainfrom
antonio-hickey:alt-unstable-feauture

Conversation

@antonio-hickey
Copy link
Contributor

@antonio-hickey antonio-hickey commented Jan 27, 2026

Replacing all occurrences of addr_of_mut!(place) with &raw mut place.

This will allow us to reduce macro complexity, and improve consistency with existing reference syntax as &raw mut is similar to &mut making it fit more naturally with other existing code.

NOTE: A alternative version of #49, but based on #102

@antonio-hickey antonio-hickey changed the title refactor to use &raw mut refactor to use &raw mut (alternative version) Jan 31, 2026
@BennoLossin
Copy link
Member

We landed #102 now. So I think I'm preferring this over #49, would you mind rebasing (most of the conflicts should come from the fact that you're also carrying Gary's patch).

@antonio-hickey
Copy link
Contributor Author

antonio-hickey commented Feb 27, 2026 via email

@BennoLossin
Copy link
Member

Yea sorry I’ve been swamped, I’ll get this finished this weekend.

No worries & no rush, I also was pretty busy.

Have I missed this most recent release window?

The one for 7.0, yes, but there always is a next one, so I wouldn't worry about that.

@antonio-hickey antonio-hickey force-pushed the alt-unstable-feauture branch from eb3dec3 to 6e666ba Compare March 1, 2026 00:39
@antonio-hickey antonio-hickey changed the title refactor to use &raw mut (alternative version) refactor to use &raw mut Mar 1, 2026
`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: Rust-for-Linux/linux#1148
Closes: Rust-for-Linux#99
Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
[ Reworded commit message - Benno ]
Signed-off-by: Benno Lossin <lossin@kernel.org>
@BennoLossin BennoLossin force-pushed the alt-unstable-feauture branch from 6e666ba to e277630 Compare March 8, 2026 19:27
@BennoLossin
Copy link
Member

@antonio-hickey I took the liberty to adjust the commit message & rebase this PR (no changes were required). Thanks a lot for working on this! I'll merge this when CI passes.

@BennoLossin BennoLossin merged commit bbf992b into Rust-for-Linux:main Mar 8, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants