disallow naked_asm!
outside of #[naked]
functions
This commit is contained in:
parent
26b2b8d162
commit
6ca5ec7b4e
11 changed files with 132 additions and 16 deletions
|
@ -2418,11 +2418,22 @@ impl InlineAsmOperand {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Encodable, Decodable, Debug, HashStable_Generic)]
|
||||
pub enum AsmMacro {
|
||||
/// The `asm!` macro
|
||||
Asm,
|
||||
/// The `global_asm!` macro
|
||||
GlobalAsm,
|
||||
/// The `naked_asm!` macro
|
||||
NakedAsm,
|
||||
}
|
||||
|
||||
/// Inline assembly.
|
||||
///
|
||||
/// E.g., `asm!("NOP");`.
|
||||
#[derive(Clone, Encodable, Decodable, Debug)]
|
||||
pub struct InlineAsm {
|
||||
pub asm_macro: AsmMacro,
|
||||
pub template: Vec<InlineAsmTemplatePiece>,
|
||||
pub template_strs: Box<[(Symbol, Option<Symbol>, Span)]>,
|
||||
pub operands: Vec<(InlineAsmOperand, Span)>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue