-
Notifications
You must be signed in to change notification settings - Fork 13
refactor to use &raw mut
#49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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! |
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 |
Yea I can fix the examples/tests, and update the Also yea |
7dafc0b
to
5dd94e7
Compare
542b0bf
to
08c7e13
Compare
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:
|
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"), |
Also could you rebase onto |
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. Suggested-by: Benno Lossin <benno.lossin@proton.me> Link: Rust-for-Linux/linux#1148 Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
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 |
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! |
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.