diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-10-24 11:57:02 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-10 23:34:43 +0100 |
commit | 20f0b8e98b4851bfd52bbb4edd4b602d08b9b817 (patch) | |
tree | 48080f85c290b9a87a16044d8bd03afcffdf0728 /rust/qemu-api/src/module.rs | |
parent | 7f65d4e58b67d6e5ee05c9381a50ef1eba3a5a1e (diff) | |
download | qemu-20f0b8e98b4851bfd52bbb4edd4b602d08b9b817.zip qemu-20f0b8e98b4851bfd52bbb4edd4b602d08b9b817.tar.gz qemu-20f0b8e98b4851bfd52bbb4edd4b602d08b9b817.tar.bz2 |
rust: macros: check that #[derive(Object)] requires #[repr(C)]
Convert derive_object to the same pattern of first making a
Result<proc_macro2::TokenStream, CompileError>, and then doing
.unwrap_or_else(Into::into) to support checking the validity of
the input. Add is_c_repr to check that all QOM structs include
a #[repr(C)] attribute.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/module.rs')
0 files changed, 0 insertions, 0 deletions