From: Yury Norov <ynorov@nvidia.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Gary Guo" <gary@garyguo.net>, "Benno Lossin" <lossin@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"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>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Yury Norov" <yury.norov@gmail.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nsc@kernel.org>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 2/2] rust: add `const_assert!` macro
Date: Thu, 12 Feb 2026 15:16:37 -0500 [thread overview]
Message-ID: <aY41JdJ3_Nq9n_JY@yury> (raw)
In-Reply-To: <CANiq72kkLe-to9hO9+Q6kk-xpfAUZTCEBug05USruPymE4GkeA@mail.gmail.com>
On Mon, Feb 09, 2026 at 12:44:19PM +0100, Miguel Ojeda wrote:
> On Sun, Feb 8, 2026 at 10:07 PM Yury Norov <ynorov@nvidia.com> wrote:
> >
> > Can you please keep more context? It would be easier to refer to an
> > example if I have it on hand.
>
> The existing docs for `build_assert!` have a couple examples that may help:
>
> https://rust.docs.kernel.org/kernel/macro.build_assert.html
>
> (Those are the kind of examples I would like to have in the module
> level docs, I think they help a lot to quickly see for what each one
> is used for, even if one may not know the exact Rust terminology
> etc.).
>
> > I agree with ""Build-time check" here is a bit confusing", and the
> > following indeed looks like a compiler implementation discussion. So
> > I concluded that the difference between build_assert and const_assert
> > is not visible from programmer's POV. Please correct me if I'm wrong.
>
> Gary has also nicely explained in detail the three Rust ones -- what I
> was suggesting is to take something like that and put it in a single
> explanation in the module docs, with the examples we have (or others).
Yes he did. Thanks to you and Gary for sorting things out. I'll walk
through the #2 of this series shortly, but overall it makes sense and
looks good.
I agree, would be great to wrap explanations up in the docs.
next prev parent reply other threads:[~2026-02-12 20:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 17:12 [PATCH 1/2] rust: move `static_assert` into `build_assert` Gary Guo
2026-02-06 17:12 ` [PATCH 2/2] rust: add `const_assert!` macro Gary Guo
2026-02-06 21:30 ` Benno Lossin
2026-02-06 21:48 ` Gary Guo
2026-02-08 5:58 ` Yury Norov
2026-02-08 10:35 ` Miguel Ojeda
2026-02-08 21:07 ` Yury Norov
2026-02-09 5:16 ` Gary Guo
2026-02-09 11:44 ` Miguel Ojeda
2026-02-12 20:16 ` Yury Norov [this message]
2026-02-06 22:21 ` John Hubbard
2026-02-06 22:28 ` Gary Guo
2026-02-06 23:37 ` John Hubbard
2026-02-13 1:16 ` Yury Norov
2026-02-13 9:06 ` Gary Guo
2026-02-13 10:26 ` 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=aY41JdJ3_Nq9n_JY@yury \
--to=ynorov@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=yury.norov@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.