summary refs log tree commit diff stats
path: root/rust/qemu-api/tests/tests.rs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-28 11:47:12 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-12-10 18:49:26 +0100
commit3701fb22dfd438993e76e158beb97683359d1dd9 (patch)
tree7f7de3887761fa294b6a46a39f39363bf22eaa91 /rust/qemu-api/tests/tests.rs
parent93ea0896eaa97adfcc664fa65b5b70e555a652ff (diff)
downloadfocaccia-qemu-3701fb22dfd438993e76e158beb97683359d1dd9.tar.gz
focaccia-qemu-3701fb22dfd438993e76e158beb97683359d1dd9.zip
rust: qom: convert type_info! macro to an associated const
type_info! is only used in the definition of ObjectImpl::TYPE_INFO, and
in fact in all of them.  Pull type_info!'s definition into the ObjectImpl
trait, thus simplifying the external interface of qemu_api::definitions.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/tests/tests.rs')
-rw-r--r--rust/qemu-api/tests/tests.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs
index 704c63c846..7f9df348b0 100644
--- a/rust/qemu-api/tests/tests.rs
+++ b/rust/qemu-api/tests/tests.rs
@@ -55,7 +55,6 @@ fn test_device_decl_macros() {
 
     impl ObjectImpl for DummyState {
         type Class = DummyClass;
-        const TYPE_INFO: qemu_api::bindings::TypeInfo = qemu_api::type_info! { Self };
         const TYPE_NAME: &'static CStr = c_str!("dummy");
         const PARENT_TYPE_NAME: Option<&'static CStr> = Some(device_class::TYPE_DEVICE);
     }