diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2024-09-10 14:42:17 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2024-09-10 15:19:14 +0200 |
| commit | 6ca5ec7b4ef0466a1cdf3fbce9212cabc171d21a (patch) | |
| tree | 75f7f4133a2be928216e01818005068d8daa25f8 /compiler/rustc_ast_lowering | |
| parent | 26b2b8d162ff6cc399c7e8005230beea7eb12037 (diff) | |
| download | rust-6ca5ec7b4ef0466a1cdf3fbce9212cabc171d21a.tar.gz rust-6ca5ec7b4ef0466a1cdf3fbce9212cabc171d21a.zip | |
disallow `naked_asm!` outside of `#[naked]` functions
Diffstat (limited to 'compiler/rustc_ast_lowering')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/asm.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index e077c544965..4413c259efb 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -474,8 +474,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { ); let line_spans = self.arena.alloc_from_iter(asm.line_spans.iter().map(|span| self.lower_span(*span))); - let hir_asm = - hir::InlineAsm { template, template_strs, operands, options: asm.options, line_spans }; + let hir_asm = hir::InlineAsm { + asm_macro: asm.asm_macro, + template, + template_strs, + operands, + options: asm.options, + line_spans, + }; self.arena.alloc(hir_asm) } } |
