]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: pin-init: implement ZeroableOption for NonZero* integer types
authorHamdan-Khan <hamdankhan212@gmail.com>
Thu, 19 Mar 2026 09:35:27 +0000 (10:35 +0100)
committerBenno Lossin <lossin@kernel.org>
Wed, 25 Mar 2026 09:57:33 +0000 (10:57 +0100)
commitaa9ec9460dd5c09849e09c3fac8f4286d2dc0312
treefc7baa8a4c0f74b724342cb6a7449185d2bb2b6f
parent44f6fa0dced7babfbfd08683fe376b0c72ebbec7
rust: pin-init: implement ZeroableOption for NonZero* integer types

Add a macro for implementing `ZeroableOption` for `NonZero*` types.

`Option<NonZero*>` now automatically implements `Zeroable` trait  by
implementing `ZeroableOption` for `NonZero*` types, which serves as a
blanket impl.

Closes: https://github.com/Rust-for-Linux/pin-init/issues/95
Signed-off-by: Hamdan-Khan <hamdankhan212@gmail.com>
Link: https://github.com/Rust-for-Linux/pin-init/commit/74f772641cd9670848fa360f4ebfd20fdb40bf78
[ Fixed a typo in the commit message. - Benno ]
Link: https://patch.msgid.link/20260319093542.3756606-5-lossin@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
rust/pin-init/src/lib.rs