[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DCNF9KPSUQWW.2PKY7OGPWNOT5@nvidia.com>
Date: Mon, 08 Sep 2025 21:36:37 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Miguel Ojeda" <miguel.ojeda.sandonis@...il.com>
Cc: "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>, "Benno Lossin" <lossin@...nel.org>, "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>,
<nouveau@...ts.freedesktop.org>
Subject: Re: [PATCH v4 1/2] rust: add `Alignment` type
On Mon Sep 8, 2025 at 9:18 PM JST, Miguel Ojeda wrote:
> On Thu, Aug 21, 2025 at 2:42 PM Alexandre Courbot <acourbot@...dia.com> wrote:
>>
>> +/// TODO: Temporary substitute for the [`Alignment`] nightly type from the standard library, and to
>> +/// be eventually replaced by it.
>
> Should this be a comment, i.e. `//`, rather than part of the docs? (It
> is fine intermixing if needed, or putting them at the end of the docs
> too).
It's probably better as a regular comment indeed.
>
>> + /// Validates that `align` is a power of two at runtime, and returns an
>> + /// [`Alignment`] of the same value.
>> + ///
>> + /// [`None`] is returned if `align` is not a power of two.
>
> "Returns [`None`] if ..." is probably simpler.
>
> (Sending these two nits since you will send a new version with the
> const generic.)
Thanks, I'll apply them!
Powered by blists - more mailing lists