qemu/rust
Zhao Liu e5655e92a8 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>
2025-03-21 12:56:00 +01:00
..
hw rust: pl011: Check size of state struct at compile time 2025-03-21 12:51:16 +01:00
qemu-api rust/vmstate: Fix unnecessary VMState bound of with_varray_flag() 2025-03-21 12:56:00 +01:00
qemu-api-macros rust: qemu_api_macros: add Wrapper derive macro 2025-03-06 12:44:46 +01:00
.gitignore rust: add bindgen step as a meson dependency 2024-10-11 12:32:17 +02:00
Cargo.lock rust: subprojects: add libc crate 2025-02-25 10:49:23 +01:00
Cargo.toml rust: hpet: decode HPET registers into enums 2025-03-06 12:44:47 +01:00
clippy.toml rust: add clippy configuration file 2025-02-07 15:51:01 +01:00
Kconfig rust: add PL011 device model 2024-11-05 14:18:15 +01:00
meson.build rust: build: add "make clippy", "make rustfmt", "make rustdoc" 2024-12-10 18:44:06 +01:00
rustfmt.toml rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00
wrapper.h rust: pl011: Check size of state struct at compile time 2025-03-21 12:51:16 +01:00