| Date | Mon, 3 Jul 2023 11:50:00 +0000 | Subject | [PATCH 2/7] rust: add derive macro for `Zeroable` | From | Alice Ryhl <> |
| |
Benno Lossin <benno.lossin@proton.me> writes: > Add a derive proc-macro for the `Zeroable` trait. The macro supports > structs where every field implements the `Zeroable` trait. This way > `unsafe` implementations can be avoided. > > The macro is split into two parts: > - a proc-macro to parse generics into impl and ty generics, > - a declarative macro that expands to the impl block. > > Suggested-by: Asahi Lina <lina@asahilina.net> > Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
|