[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72mv3RAT0rxApNV=xftTjMBKikRMrdFnPfUuiCBN=YRhkA@mail.gmail.com>
Date: Sat, 7 Jun 2025 19:30:08 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Christian Schrefl <chrisi.schrefl@...il.com>
Cc: Benno Lossin <lossin@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] rust: add `assert_sync` function
On Sat, Jun 7, 2025 at 5:54 PM Christian Schrefl
<chrisi.schrefl@...il.com> wrote:
>
> Should I already add this in V2 for this series?
I would do that in a separate patch (possibly in this series, or later on).
> I've tried it with `compile_fail` and it didn't work, I think
> that's not supported in (kernel) doc tests yet.
Yeah, it isn't -- please leave a normal comment to indicate it, so
that we can replace it with the real annotation in the future.
> That might make sense, with macros we would not need to write
> a const block to ensure its not executed at runtime (although
> it's probably optimized out anyways). It would also mean that
There is nothing to execute, no? It is `#[inline(always)]`, and even
if that wasn't enough, we always build with optimizations enabled.
But yeah, if needed, we may want to have macro(s) like that.
Thanks!
Cheers,
Miguel
Powered by blists - more mailing lists