aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api/src/qdev.rs
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2025-03-18 21:02:11 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2025-03-21 12:56:00 +0100
commite5655e92a8b984129aed12f24fc50d6e3f63429d (patch)
tree27b64d367f59dd96bed19d16069884286605f73e /rust/qemu-api/src/qdev.rs
parent42c814b1395c39659270248d205deaaaa47a84f2 (diff)
downloadqemu-e5655e92a8b984129aed12f24fc50d6e3f63429d.zip
qemu-e5655e92a8b984129aed12f24fc50d6e3f63429d.tar.gz
qemu-e5655e92a8b984129aed12f24fc50d6e3f63429d.tar.bz2
rust/vmstate: Fix unnecessary VMState bound of with_varray_flag()
The VMState type bound is not used in with_varray_flag(). And for vmstate_struct, Rust cannot infer the type of `num` from the call_func_with_field(), so this causes the compiling error because it complains "cannot satisfy `_: VMState`" in with_varray_flag(). Note Rust can infer the type in vmstate_of macro so that with_varray_flag() can work at there. It is possible that the different initialization ways in the two macros cause differences in Rust's type inference. But in fact, the VMState type bound is not used in with_varray_flag() and vmstate_varray_flag() has already checked the VMState type, it's safe to drop VMState bound of with_varray_flag(), which can fix the above compiling error. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250318130219.1799170-8-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/qdev.rs')
0 files changed, 0 insertions, 0 deletions