[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DC217EL7VQVH.S8MMZF1LP13N@kernel.org>
Date: Thu, 14 Aug 2025 11:09:32 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Andreas Hindborg" <a.hindborg@...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>, "Alice Ryhl"
<aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>, "Danilo
Krummrich" <dakr@...nel.org>, "Fiona Behrens" <me@...enk.dev>, "Christian
Schrefl" <chrisi.schrefl@...il.com>
Cc: "Lyude Paul" <lyude@...hat.com>, <rust-for-linux@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 03/13] rust: pin-init: add `zeroed()` &
`Zeroable::zeroed()` functions
On Fri Aug 8, 2025 at 11:31 AM CEST, Andreas Hindborg wrote:
> "Benno Lossin" <lossin@...nel.org> writes:
>
>> `zeroed()` returns a zeroed out value of a sized type implementing
>> `Zeroable`.
>>
>> The function is added as a free standing function, in addition to an
>> associated function on `Zeroable`, because then it can be marked `const`
>> (functions in traits can't be const at the moment).
>
> Do you want to add a note on this in the code, so we can const the trait
> function and let go of the other one if it becomes possible in the
> future?
I'll create an issue instead (the commit is already merged).
---
Cheers,
Benno
Powered by blists - more mailing lists