diff options
| author | Benno Lossin <[email protected]> | 2025-03-08 11:04:43 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2025-03-16 20:59:18 +0000 |
| commit | 5657c3a9faf6c1243cecc9314244c92bfcd1ecad (patch) | |
| tree | 8999fc069ff6d4bc3d1910edbc375a997110756b /rust/macros/module.rs | |
| parent | rust: pin-init: move impl `Zeroable` for `Opaque` and `Option<KBox<T>>` into ... (diff) | |
| download | kernel-5657c3a9faf6c1243cecc9314244c92bfcd1ecad.tar.gz kernel-5657c3a9faf6c1243cecc9314244c92bfcd1ecad.zip | |
rust: add `ZeroableOption` and implement it instead of `Zeroable` for `Option<Box<T, A>>`
When making pin-init its own crate, `Zeroable` will no longer be defined
by the kernel crate and thus implementing it for `Option<Box<T, A>>` is
no longer possible due to the orphan rule.
For this reason introduce a new `ZeroableOption` trait that circumvents
this problem.
Signed-off-by: Benno Lossin <[email protected]>
Reviewed-by: Fiona Behrens <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Tested-by: Andreas Hindborg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/macros/module.rs')
0 files changed, 0 insertions, 0 deletions
