From 4ba60271b10fe73de248adf7f56c633a8b2b6f02 Mon Sep 17 00:00:00 2001 From: Zhang Junyang Date: Wed, 19 Jun 2024 08:07:27 +0000 Subject: [PATCH] Mute the unsafe macro clippy error of CPU local --- framework/aster-frame/src/cpu.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/aster-frame/src/cpu.rs b/framework/aster-frame/src/cpu.rs index be721e23..0e9ad604 100644 --- a/framework/aster-frame/src/cpu.rs +++ b/framework/aster-frame/src/cpu.rs @@ -39,6 +39,7 @@ macro_rules! cpu_local { // multiple declarations ($(#[$attr:meta])* $vis:vis static $name:ident: $t:ty = $init:expr; $($rest:tt)*) => { + #[allow(clippy::macro_metavars_in_unsafe)] $(#[$attr])* $vis static $name: $crate::CpuLocal<$t> = unsafe { $crate::CpuLocal::new($init) }; $crate::cpu_local!($($rest)*); };