From: Benno Lossin <benno.lossin@proton.me>
To: "Antonio Hickey" <contact@antoniohickey.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>
Cc: Benno Lossin <y86-dev@protonmai.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] rust: enable `raw_ref_op` feature
Date: Sat, 15 Mar 2025 09:58:11 +0000 [thread overview]
Message-ID: <D8GR1RC32370.2EJN57V2ZYA7R@proton.me> (raw)
In-Reply-To: <0100019597091f92-cb55b6cd-4d06-4d14-8d9c-1a1314949a00-000000@email.amazonses.com>
On Sat Mar 15, 2025 at 12:41 AM CET, Antonio Hickey wrote:
> Since Rust 1.82.0 the `raw_ref_op` feature is stable.
>
> By enabling this feature we can use `&raw place` and `&raw mut place`
> instead of using `addr_of!(place)` and `addr_of_mut!(place)` macros.
>
> This will allow us to reduce macro complexity, and improve consistency
> with existing reference syntax as `&raw`, `&raw mut` is very similar to
> `&`, `&mut` making it fit more naturally with other existing code.
>
> Suggested-by: Benno Lossin <y86-dev@protonmai.com>
This still has my old email, please use <benno.lossin@proton.me>.
---
Cheers,
Benno
> Link: https://github.com/Rust-for-Linux/linux/issues/1148
> Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
> ---
> rust/kernel/lib.rs | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
> index 398242f92a96..1d078f69bb19 100644
> --- a/rust/kernel/lib.rs
> +++ b/rust/kernel/lib.rs
> @@ -19,6 +19,8 @@
> #![cfg_attr(not(CONFIG_RUSTC_HAS_COERCE_POINTEE), feature(unsize))]
> #![feature(inline_const)]
> #![feature(lint_reasons)]
> +// Stable in Rust 1.82
> +#![feature(raw_ref_op)]
> // Stable in Rust 1.83
> #![feature(const_maybe_uninit_as_mut_ptr)]
> #![feature(const_mut_refs)]
next prev parent reply other threads:[~2025-03-15 9:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250314234148.599196-1-contact@antoniohickey.com>
2025-03-14 23:41 ` [PATCH v3 1/3] rust: enable `raw_ref_op` feature Antonio Hickey
2025-03-15 9:58 ` Benno Lossin [this message]
2025-03-14 23:41 ` [PATCH v3 2/3] rust: replace `addr_of[_mut]!` with `&raw [mut]` Antonio Hickey
2025-03-15 0:18 ` Boqun Feng
2025-03-16 2:57 ` Antonio Hickey
2025-03-16 4:15 ` Boqun Feng
2025-03-15 0:23 ` Boqun Feng
2025-03-15 9:47 ` Benno Lossin
2025-03-15 12:42 ` Boqun Feng
2025-03-14 23:41 ` [PATCH v3 3/3] rust: clippy: disable `addr_of!` and `addr_of_mut` macros Antonio Hickey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D8GR1RC32370.2EJN57V2ZYA7R@proton.me \
--to=benno.lossin@proton.me \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=contact@antoniohickey.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=y86-dev@protonmai.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).