Skip to content

Commit 2396811

Browse files
committed
disallow asm! in #[naked] functions
also disallow the `noreturn` option, and infer `naked_asm!` as `!`
1 parent dc3aaae commit 2396811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parse/macros/asm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use rustc_ast::ast;
2-
use rustc_builtin_macros::asm::{parse_asm_args, AsmArgs, AsmMacro};
2+
use rustc_builtin_macros::asm::{parse_asm_args, AsmArgs};
33

44
use crate::rewrite::RewriteContext;
55

66
#[allow(dead_code)]
77
pub(crate) fn parse_asm(context: &RewriteContext<'_>, mac: &ast::MacCall) -> Option<AsmArgs> {
88
let ts = mac.args.tokens.clone();
99
let mut parser = super::build_parser(context, ts);
10-
parse_asm_args(&mut parser, mac.span(), AsmMacro::Asm).ok()
10+
parse_asm_args(&mut parser, mac.span(), ast::AsmMacro::Asm).ok()
1111
}

0 commit comments

Comments
 (0)