diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-12 12:18:10 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-25 16:18:12 +0100 |
| commit | ac5699c5da51fa9d39bc964e81645953796f7ad1 (patch) | |
| tree | 258da03c1d783f8ed954cb7fbf2470bd305ac0dc /rust/qemu-api/src/qdev.rs | |
| parent | 646140dfebd42a9a9df8f15a22027b7efcb072cf (diff) | |
| download | focaccia-qemu-ac5699c5da51fa9d39bc964e81645953796f7ad1.tar.gz focaccia-qemu-ac5699c5da51fa9d39bc964e81645953796f7ad1.zip | |
rust: add IsA bounds to QOM implementation traits
Check that the right bounds are provided to the qom_isa! macro whenever the class is defined to implement a certain class. This removes the need to add IsA<> bounds together with the *Impl trait bounds. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/qdev.rs')
| -rw-r--r-- | rust/qemu-api/src/qdev.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/qemu-api/src/qdev.rs b/rust/qemu-api/src/qdev.rs index 3a7aa4def6..c4dd26b582 100644 --- a/rust/qemu-api/src/qdev.rs +++ b/rust/qemu-api/src/qdev.rs @@ -86,7 +86,7 @@ unsafe extern "C" fn rust_resettable_exit_fn<T: ResettablePhasesImpl>( } /// Trait providing the contents of [`DeviceClass`]. -pub trait DeviceImpl: ObjectImpl + ResettablePhasesImpl { +pub trait DeviceImpl: ObjectImpl + ResettablePhasesImpl + IsA<DeviceState> { /// _Realization_ is the second stage of device creation. It contains /// all operations that depend on device properties and can fail (note: /// this is not yet supported for Rust devices). |