* [PATCH] rust: hpet: fix new warning
@ 2025-06-17 8:10 Paolo Bonzini
2025-06-17 14:48 ` Stefan Hajnoczi
2025-06-17 14:52 ` Zhao Liu
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2025-06-17 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-rust, stefanha, Zhao Liu
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.
Cc: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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 a281927781e..acf7251029e 100644
--- a/rust/hw/timer/hpet/src/device.rs
+++ b/rust/hw/timer/hpet/src/device.rs
@@ -771,7 +771,7 @@ fn reset_hold(&self, _type: ResetType) {
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);
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rust: hpet: fix new warning
2025-06-17 8:10 [PATCH] rust: hpet: fix new warning Paolo Bonzini
@ 2025-06-17 14:48 ` Stefan Hajnoczi
2025-06-17 14:52 ` Zhao Liu
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2025-06-17 14:48 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, qemu-rust, Zhao Liu
[-- Attachment #1: Type: text/plain, Size: 485 bytes --]
On Tue, Jun 17, 2025 at 10:10:38AM +0200, Paolo Bonzini wrote:
> 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.
>
> Cc: Zhao Liu <zhao1.liu@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> rust/hw/timer/hpet/src/device.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rust: hpet: fix new warning
2025-06-17 8:10 [PATCH] rust: hpet: fix new warning Paolo Bonzini
2025-06-17 14:48 ` Stefan Hajnoczi
@ 2025-06-17 14:52 ` Zhao Liu
1 sibling, 0 replies; 3+ messages in thread
From: Zhao Liu @ 2025-06-17 14:52 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, qemu-rust, stefanha
On Tue, Jun 17, 2025 at 10:10:38AM +0200, Paolo Bonzini wrote:
> Date: Tue, 17 Jun 2025 10:10:38 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH] rust: hpet: fix new warning
> X-Mailer: git-send-email 2.49.0
>
> 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.
>
> Cc: Zhao Liu <zhao1.liu@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> rust/hw/timer/hpet/src/device.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-17 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17 8:10 [PATCH] rust: hpet: fix new warning Paolo Bonzini
2025-06-17 14:48 ` Stefan Hajnoczi
2025-06-17 14:52 ` Zhao Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).