rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benno Lossin <benno.lossin@proton.me>
To: Antonio Hickey <contact@antoniohickey.com>, tamird@gmail.com
Cc: a.hindborg@kernel.org, alex.gaynor@gmail.com,
	aliceryhl@google.com, bjorn3_gh@protonmail.com,
	boqun.feng@gmail.com, dakr@kernel.org, gary@garyguo.net,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu,
	ojeda@kernel.org, rust-for-linux@vger.kernel.org,
	tmgross@umich.edu
Subject: Re: [PATCH v5 01/17] rust: enable `raw_ref_op` feature
Date: Sat, 22 Mar 2025 19:39:35 +0000	[thread overview]
Message-ID: <D8N1SQ8V7WAQ.21T9FK0YDMKLK@proton.me> (raw)
In-Reply-To: <20250322191210.1926380-1-contact@antoniohickey.com>

On Sat Mar 22, 2025 at 8:12 PM CET, Antonio Hickey wrote:
> On Sat, Mar 22, 2025 at 02:24:30PM -0400, Tamir Duberstein wrote:
>> On Sat, Mar 22, 2025 at 11:08 AM Antonio Hickey
>> <contact@antoniohickey.com> wrote:
>> > On Sat, Mar 22, 2025 at 10:16:01AM +0000, Benno Lossin wrote:
>> > > On Thu Mar 20, 2025 at 3:07 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 const place` and
>> > > > `&raw mut place` instead of using `addr_of!(place)` and
>> > > > `addr_of_mut!(place)` macros.
>> > > >
>> > > > Allowing us to reduce macro complexity, and improve consistency
>> > > > with existing reference syntax as `&raw const`, `&raw mut` are
>> > > > similar to `&`, `&mut` making it fit more naturally with other
>> > > > existing code.
>> > > >
>> > > > Suggested-by: Benno Lossin <benno.lossin@proton.me>
>> > > > Link: https://github.com/Rust-for-Linux/linux/issues/1148
>> > > > Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
>> > >
>> > > Reviewed-by: Benno Lossin <benno.lossin@proton.me>
>> > >
>> > > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
>> > > > index 993708d11874..a73aaa028e34 100644
>> > > > --- a/scripts/Makefile.build
>> > > > +++ b/scripts/Makefile.build
>> > > > @@ -224,9 +224,9 @@ $(obj)/%.lst: $(obj)/%.c FORCE
>> > > >     $(call if_changed_dep,cc_lst_c)
>> > > >
>> > > >  # Compile Rust sources (.rs)
>> > > > -# ---------------------------------------------------------------------------
>> > > > +# --------------------------------------------------------------------------------------
>> > >
>> > > Not sure about this change.
>> >
>> > This change is so I could enable the `raw_ref_op` feature for doctests
>> > since the minimum Rust version 1.78 still has `raw_ref_op` as an
>> > expiramental feature, and will throw errors at compile if a doctest uses
>> > it. Is there a better way to do this?
>> 
>> I think Benno is just asking about the extension of the dashed line.
>
> Ahh ok yea that makes sense, thanks Tamir, sorry Benno I misunderstood.

No worries, it is exactly as Tamir said.

> So the reason I extended the dashed line was because before my change 
> the dashed line perfectly aligned with number of characters in the line
> I changed. I figured it was supposed to match the amount of characters
> of the line.
>
> Giving this a deeper look it looks like the all the other dashed lines
> are maxed at 77 characters. 

Yeah that's also what I thought, so I wouldn't change it.

> I will update this.

If you send another version, you can update this, but Miguel might pick
the patch early, he can then remove the change above when taking the
patch (so I wouldn't send a new version just to change this single
line).

---
Cheers,
Benno


  reply	other threads:[~2025-03-22 19:39 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  2:07 [PATCH v5 00/17] refactor to utilize `&raw [const|mut]` Antonio Hickey
2025-03-20  2:07 ` [PATCH v5 01/17] rust: enable `raw_ref_op` feature Antonio Hickey
2025-03-20  7:32   ` Andreas Hindborg
2025-03-22 10:16   ` Benno Lossin
2025-03-22 15:02     ` Antonio Hickey
2025-03-22 18:24       ` Tamir Duberstein
2025-03-22 19:12         ` Antonio Hickey
2025-03-22 19:39           ` Benno Lossin [this message]
2025-03-22 19:41           ` Miguel Ojeda
2025-03-22 20:12             ` Antonio Hickey
2025-03-20  2:07 ` [PATCH v5 02/17] rust: init: refactor to use `&raw [const|mut]` Antonio Hickey
2025-03-23 10:29   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 03/17] rust: list: " Antonio Hickey
2025-03-23 10:31   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 04/17] rust: task: remove use of `addr_of!` macro Antonio Hickey
2025-03-23 19:23   ` Miguel Ojeda
2025-03-20  2:07 ` [PATCH v5 05/17] rust: faux: refactor to use `&raw [const|mut]` Antonio Hickey
2025-03-23 10:33   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 06/17] rust: platform: " Antonio Hickey
2025-03-23 10:33   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 07/17] rust: pci: " Antonio Hickey
2025-03-23 10:34   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 08/17] rust: kunit: " Antonio Hickey
2025-03-23 10:35   ` Benno Lossin
2025-03-23 19:28   ` Miguel Ojeda
2025-03-20  2:07 ` [PATCH v5 09/17] rust: workqueue: " Antonio Hickey
2025-03-23 10:36   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 10/17] rust: workqueue: replace `raw_get` with pointer cast Antonio Hickey
2025-03-20  2:07 ` [PATCH v5 11/17] rust: rbtree: refactor to use `&raw [const|mut]` Antonio Hickey
2025-03-23 10:38   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 12/17] rust: net: phy: " Antonio Hickey
2025-03-20  2:07 ` [PATCH v5 13/17] rust: sync: arc: " Antonio Hickey
2025-03-23 10:39   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 14/17] rust: jump_label: " Antonio Hickey
2025-03-23 10:40   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 15/17] rust: fs: file: " Antonio Hickey
2025-03-23 10:40   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 16/17] rust: block: " Antonio Hickey
2025-03-20  7:33   ` Andreas Hindborg
2025-03-23 10:41   ` Benno Lossin
2025-03-20  2:07 ` [PATCH v5 17/17] rust: clippy: disallow `addr_of[_mut]!` macros Antonio Hickey
2025-03-20  7:33   ` Andreas Hindborg
2025-03-23 10:41   ` Benno Lossin
2025-03-23 10:45 ` [PATCH v5 00/17] refactor to utilize `&raw [const|mut]` Benno Lossin
2025-03-23 22:32 ` Miguel Ojeda

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=D8N1SQ8V7WAQ.21T9FK0YDMKLK@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-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    /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).