Home
last modified time | relevance | path

Searched hist:bb42965d (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/rust/qemu-api/src/
H A Dzeroable.rsbb42965d Fri Oct 18 04:53:19 CDT 2024 Paolo Bonzini <pbonzini@redhat.com> rust: do not use MaybeUninit::zeroed()

MaybeUninit::zeroed() is handy but is not available as a "const" function
until Rust 1.75.0.

Remove the default implementation of Zeroable::ZERO, and write by hand
the definitions for those types that need it. It may be possible to
add automatic implementation of the trait, via a procedural macro and/or
a trick similar to offset_of!, but do it the easy way for now.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>