diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-08 12:49:37 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-17 19:00:56 +0200 |
| commit | aecca0676ddd9e032de4eeda371b81598d3257bb (patch) | |
| tree | 8abd15694771d19ad50f7e626995f86c39cb8624 /rust/qemu-api/src/timer.rs | |
| parent | 71e84e5ae87b8e6adce3af7dd2a490c7b2f39772 (diff) | |
| download | focaccia-qemu-aecca0676ddd9e032de4eeda371b81598d3257bb.tar.gz focaccia-qemu-aecca0676ddd9e032de4eeda371b81598d3257bb.zip | |
rust: use inline const expressions
They were stabilized in Rust 1.79.0. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250908105005.2119297-6-pbonzini@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/timer.rs')
| -rw-r--r-- | rust/qemu-api/src/timer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/qemu-api/src/timer.rs b/rust/qemu-api/src/timer.rs index 0daec62f92..1e639eaf22 100644 --- a/rust/qemu-api/src/timer.rs +++ b/rust/qemu-api/src/timer.rs @@ -56,7 +56,7 @@ impl Timer { ) where F: for<'a> FnCall<(&'a T,)>, { - let _: () = F::ASSERT_IS_SOME; + const { assert!(F::IS_SOME) }; /// timer expiration callback unsafe extern "C" fn rust_timer_handler<T, F: for<'a> FnCall<(&'a T,)>>( |