mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 08:26:30 +00:00
Mute the unsafe macro clippy error of CPU local
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
18a0490e23
commit
4ba60271b1
@ -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)*);
|
||||
};
|
||||
|
Reference in New Issue
Block a user