diff options
| author | Benno Lossin <[email protected]> | 2025-05-23 14:50:59 +0000 |
|---|---|---|
| committer | Benno Lossin <[email protected]> | 2025-06-11 19:13:56 +0000 |
| commit | d67b37012080cf1978b5fd36f040a53f92152243 (patch) | |
| tree | 92326f2119239f1332866c5bae862b6a5a8fd6d0 /rust/pin-init/examples/static_init.rs | |
| parent | rust: pin-init: add `Zeroable::init_zeroed` (diff) | |
| download | kernel-d67b37012080cf1978b5fd36f040a53f92152243.tar.gz kernel-d67b37012080cf1978b5fd36f040a53f92152243.zip | |
rust: pin-init: add `zeroed()` & `Zeroable::zeroed()` functions
`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).
Link: https://github.com/Rust-for-Linux/pin-init/pull/56/commits/809e4ec160579c1601dce5d78b432a5b6c8e4e40
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Benno Lossin <[email protected]>
Diffstat (limited to 'rust/pin-init/examples/static_init.rs')
0 files changed, 0 insertions, 0 deletions
