Mute the unsafe macro clippy error of CPU local

This commit is contained in:
Zhang Junyang
2024-06-19 08:07:27 +00:00
committed by Tate, Hongliang Tian
parent 18a0490e23
commit 4ba60271b1

View File

@ -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)*);
};