From aecca0676ddd9e032de4eeda371b81598d3257bb Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 8 Sep 2025 12:49:37 +0200 Subject: rust: use inline const expressions They were stabilized in Rust 1.79.0. Reviewed-by: Zhao Liu Link: https://lore.kernel.org/r/20250908105005.2119297-6-pbonzini@redhat.com Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/timer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/qemu-api/src/timer.rs') 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 FnCall<(&'a T,)>>( -- cgit 1.4.1