Re: [PATCH 1/9] rust/vmstate: Support field_exists check in vmstate_struct macro

2025-04-16 Thread Paolo Bonzini
On Mon, Apr 14, 2025 at 4:29 PM Zhao Liu wrote: > > Unfortunately, at present it's not possible to have a const > "with_exist_check" method to append test_fn after vmstate_struct (due > to error on "constant functions cannot evaluate destructors" for `F`). Nothing that std::mem::forget() can't fi

[PATCH 1/9] rust/vmstate: Support field_exists check in vmstate_struct macro

2025-04-14 Thread Zhao Liu
Unfortunately, at present it's not possible to have a const "with_exist_check" method to append test_fn after vmstate_struct (due to error on "constant functions cannot evaluate destructors" for `F`). Before the vmstate builder, the only way to support "test_fn" is to extend vmstate_struct macro t