From 89107d2db4b2e018cd497707cc18179fe3f5ef2b Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 5 Mar 2026 23:27:53 +0100 Subject: [PATCH] arch: x86_64: Allow unused_unsafe on cpuid match arms The nightly compiler used by cargo fuzz no longer requires unsafe for __cpuid intrinsics, but stable still does. Signed-off-by: Anatol Belski --- arch/src/x86_64/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index 2b9ce3812..d35a878e6 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -641,6 +641,7 @@ pub fn generate_common_cpuid( // Update some existing CPUID for entry in cpuid.as_mut_slice().iter_mut() { + #[allow(unused_unsafe)] match entry.function { // Clear AMX related bits if the AMX feature is not enabled 0x7 if !config.amx => { @@ -711,7 +712,6 @@ pub fn generate_common_cpuid( // SAFETY: cpuid called with valid leaves && unsafe { std::arch::x86_64::__cpuid(0x8000_0000).eax } >= 0x8000_0006 => { - #[allow(unused_unsafe)] // SAFETY: cpuid called with valid leaves let leaf = unsafe { std::arch::x86_64::__cpuid(0x8000_0006) }; entry.eax = leaf.eax;