]> git.ipfire.org Git - thirdparty/qemu.git/commit
rust/vmstate: Fix "cannot infer type" error in vmstate_struct
authorZhao Liu <zhao1.liu@intel.com>
Tue, 18 Mar 2025 13:02:10 +0000 (21:02 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Mar 2025 11:56:00 +0000 (12:56 +0100)
commit42c814b1395c39659270248d205deaaaa47a84f2
treea5a8bac77475349cec6db1eb2961129cb7c6453d
parent618258256e6c60957100c5a01ab70f5473020cb9
rust/vmstate: Fix "cannot infer type" error in vmstate_struct

Rust cannot infer the type (it should be VMStateField) after
Zeroable::ZERO, which cause the compiling error.

To fix this error, call with_varray_flag() after VMStateField's
initialization.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250318130219.1799170-7-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/qemu-api/src/vmstate.rs