diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-04 20:48:05 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-17 09:54:52 +0200 |
| commit | 345bef46a1b6765185bfe1450cc147f5feb5d0e7 (patch) | |
| tree | 856e788fc99d931afd1e256664139efc14445564 /rust/qemu-api/src/errno.rs | |
| parent | 8d394f6cf0b50a82758b651e81a18dac13e70e7d (diff) | |
| download | focaccia-qemu-345bef46a1b6765185bfe1450cc147f5feb5d0e7.tar.gz focaccia-qemu-345bef46a1b6765185bfe1450cc147f5feb5d0e7.zip | |
rust: qom: change instance_init to take a ParentInit<>
This removes undefined behavior associated to writing to uninitialized fields, and makes it possible to remove "unsafe" from the instance_init implementation. However, the init function itself is still unsafe, because it must promise (as a sort as MaybeUninit::assume_init) that all fields have been initialized. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/errno.rs')
0 files changed, 0 insertions, 0 deletions