From 71e84e5ae87b8e6adce3af7dd2a490c7b2f39772 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 8 Sep 2025 12:49:36 +0200 Subject: rust: add missing const markers for MSRV==1.83.0 Rust 1.83 allows more functions to be marked const. Fix clippy with bumped minimum supported Rust version. Reviewed-by: Zhao Liu Link: https://lore.kernel.org/r/20250908105005.2119297-5-pbonzini@redhat.com Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/assertions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/qemu-api/src/assertions.rs') diff --git a/rust/qemu-api/src/assertions.rs b/rust/qemu-api/src/assertions.rs index a2d38c877d..e74fa3ef82 100644 --- a/rust/qemu-api/src/assertions.rs +++ b/rust/qemu-api/src/assertions.rs @@ -81,8 +81,8 @@ macro_rules! assert_field_type { (@internal $param_name:ident, $ti:ty, $t:ty, $($field:tt)*) => { const _: () = { #[allow(unused)] - fn assert_field_type($param_name: &$t) { - fn types_must_be_equal(_: &T) + const fn assert_field_type($param_name: &$t) { + const fn types_must_be_equal(_: &T) where T: $crate::assertions::EqType, { -- cgit 1.4.1