]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
rust: hpet: fix new warning
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Jun 2025 16:56:49 +0000 (18:56 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 17 Sep 2025 16:43:05 +0000 (19:43 +0300)
Nightly rustc complains that HPETAddrDecode has a lifetime but it is not
clearly noted that it comes from &self.  Apply the compiler's suggestion
to shut it up.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 6b3fad084fc4e13901e252fe6c2a2c46ecea999b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
rust/hw/timer/hpet/src/hpet.rs

index 3ae3ec25f17a63b9e480f8cb5e873cfc32fd456b..0bb31283ad8cafcb2efa0efb1a98884d86b01bd8 100644 (file)
@@ -765,7 +765,7 @@ impl HPETState {
         self.rtc_irq_level.set(0);
     }
 
-    fn decode(&self, mut addr: hwaddr, size: u32) -> HPETAddrDecode {
+    fn decode(&self, mut addr: hwaddr, size: u32) -> HPETAddrDecode<'_> {
         let shift = ((addr & 4) * 8) as u32;
         let len = std::cmp::min(size * 8, 64 - shift);