error[E0283]: type annotations needed --> hw/timer/hpet/src/device.rs:884:55 | 884 | self.num_timers == self.num_timers_save.get().into() | -- ^^^^ | | | type must be known at this point | = note: multiple `impl`s satisfying `usize: PartialEq<_>` found in the following crates: `core`, `vm_memory`: - impl PartialEq<vm_memory::endian::BeSize> for usize; - impl PartialEq<vm_memory::endian::LeSize> for usize; - impl<host> PartialEq for usize where the constant `host` has type `bool`; help: try using a fully qualified path to specify the expected types | 884 | self.num_timers == <u8 as Into<T>>::into(self.num_timers_save.get()) | ++++++++++++++++++++++ ~
For more information about this error, try `rustc --explain E0283`. error: could not compile `hpet` (lib) due to 1 previous error Signed-off-by: Zhao Liu <zhao1....@intel.com> --- rust/hw/timer/hpet/src/device.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/hw/timer/hpet/src/device.rs b/rust/hw/timer/hpet/src/device.rs index acf7251029e9..9fd75bf096e4 100644 --- a/rust/hw/timer/hpet/src/device.rs +++ b/rust/hw/timer/hpet/src/device.rs @@ -881,7 +881,7 @@ fn is_offset_needed(&self) -> bool { } fn validate_num_timers(&self, _version_id: u8) -> bool { - self.num_timers == self.num_timers_save.get().into() + self.num_timers == Into::<usize>::into(self.num_timers_save.get()) } } -- 2.34.1