Uh oh!
There was an error while loading. Please reload this page.
refactor to use &raw mut - #49
Conversation
I expected the CI to fail and it didn't, turns out I had some wrong configurations there. I fixed it now, could you rebase on top of Also, since I'm synchronizing the commit as-is into the linux repository, could you add a commit description similar to the one you had in the series on the rust-for-linux mailing list? Thanks! |
antonio-hickey
commented
Apr 29, 2025
GitHub closed the PR because I used it's native sync from upstream instead of just rebasing using git like I should've and had to do anyways haha. |
The |
antonio-hickey
commented
Apr 30, 2025
Yea I can fix the examples/tests, and update the Also yea |
7dafc0b to
5dd94e7Compare542b0bf to
08c7e13Compareantonio-hickey
commented
Jun 25, 2025
Hey Benno Any idea why nightly-msrv is still failing? The errors are still due to "raw address of syntax is experimental" However I've gone through each error thrown and verified it has a conditional to use the The files in error:
|
BennoLossin
commented
Jun 25, 2025
You forgot to add one in diff --git a/examples/static_init.rs b/examples/static_init.rs
index 0e165daa9798..6247cb39d076 100644
--- a/examples/static_init.rs+++ b/examples/static_init.rs@@ -3,6 +3,7 @@
#![allow(clippy::undocumented_unsafe_blocks)]
#![cfg_attr(feature = "alloc", feature(allocator_api))]
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
+#![cfg_attr(not(RUSTC_RAW_REF_OP_IS_STABLE), feature(raw_ref_op))]
#![allow(unused_imports)]
use core::{
diff --git a/src/lib.rs b/src/lib.rs
index 8f89e8da7a79..e8ccfb7c3626 100644
--- a/src/lib.rs+++ b/src/lib.rs@@ -264,6 +264,7 @@
//! [Rust-for-Linux]: https://rust-for-linux.com/
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
+#![cfg_attr(not(RUSTC_RAW_REF_OP_IS_STABLE), feature(raw_ref_op))]
#![cfg_attr(
all(
any(feature = "alloc", feature = "std"), |
BennoLossin
commented
Jun 25, 2025
Also could you rebase onto |
antonio-hickey
commented
Aug 9, 2025
Hey Benno, I rebased onto I noticed it only fails the rustc 1.89 which was just released a couple days ago, so previous commit's weren't checked against this. I went back to the latest commit on I'd be open to fixing this in a separate PR if you want, either marking the Thanks |
BennoLossin
commented
Aug 9, 2025
Oh interesting... That's a new failure and I wonder why the nightly CI workflow didn't catch it... I have some other CI updates that I'll want to do next week, so I'll add this one to the list. Thanks for the heads-up! |
BennoLossin
commented
Jan 17, 2026
Hey @antonio-hickey do you intend to update this PR & continue working on this, or can we close it? |
antonio-hickey
commented
Jan 18, 2026
Yea I'll rebase this later tonight and see what needs to be done |
BennoLossin
commented
Jan 18, 2026
Oh no rush, just wanted to make sure we get this in the next cycle, so it would be great if you could update the PR in the next weeks. |
47426c0 to
5dbfcd9CompareReplacing 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. Suggested-by: Benno Lossin <benno.lossin@proton.me> Link: Rust-for-Linux/linux#1148 Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
antonio-hickey
commented
Jan 21, 2026
Hey Benno, I rebased and fixed some stuff to pass tests, only failing the expected error outputs in ui-tests. Thanks |
BennoLossin
left a comment
There was a problem hiding this comment.
Thanks for the quick work! If you have time, could you try #102 and build upon that to see if it makes things easier (it's best if it's a new PR to better compare the approach)?
If you don't have time for that, don't worry, I'll do it & port your commits over to that. This has been going on for way too long, sorry about that!
antonio-hickey
commented
Jan 22, 2026
Yea, I'll submit a new PR and compare it against this one. Of course no rush, but just for rough time estimates it should be a couple days. |
BennoLossin
commented
Mar 2, 2026
I'll just close this, in favor of #105 |
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 mutis similar to&mutmaking it fit more naturally with other existing code.