[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <D9D091TSBCKA.2C3REET71ZWTC@proton.me>
Date: Tue, 22 Apr 2025 07:56:11 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...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>, Fiona Behrens <me@...enk.dev>, Christian Schrefl <chrisi.schrefl@...il.com>, Alban Kurti <kurti@...icto.ai>, Michael Vetter <jubalh@...oru.org>, rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] rust: pin-init: add `MaybeZeroable` derive macro
On Tue Apr 22, 2025 at 6:54 AM CEST, Boqun Feng wrote:
> On Mon, Apr 21, 2025 at 10:18:52PM +0000, Benno Lossin wrote:
>> This derive macro implements `Zeroable` for structs & unions precisely
>> if all fields also implement `Zeroable` and does nothing otherwise. The
>> plain `Zeroable` derive macro instead errors when it cannot derive
>> `Zeroable` safely. The `MaybeZeroable` derive macro is useful in cases
>> where manual checking is infeasible such as with the bindings crate.
>>
>
> Hmm... seems we need a customized auto trait? How hard would that be?
Very hard. AFAIK Rust folks are trying to remove them.
---
Cheers,
Benno
Powered by blists - more mailing lists