From 8447aa300003197fce126e8dd0ed9db7a7523ce4 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Fri, 1 Oct 2021 00:02:15 +0800 Subject: [PATCH] nac3artiq: allows kernel function --- nac3artiq/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nac3artiq/src/lib.rs b/nac3artiq/src/lib.rs index b93d1cc..b99cabb 100644 --- a/nac3artiq/src/lib.rs +++ b/nac3artiq/src/lib.rs @@ -129,7 +129,8 @@ impl Nac3 { ref decorator_list, .. } => decorator_list.iter().any(|decorator| { if let ast::ExprKind::Name { id, .. } = decorator.node { - id.to_string() == "extern" || id.to_string() == "portable" + let id = id.to_string(); + id == "extern" || id == "portable" || id == "kernel" } else { false }