diff options
| author | Gary Guo <gary@garyguo.net> | 2023-12-25 20:53:01 +0000 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2024-02-24 18:49:39 +0000 |
| commit | 93fa8579c6430d54525e1905eafff4dbcf9b31b0 (patch) | |
| tree | 9067a6612b4f7d05213d708c49e6a64390be914d /compiler/rustc_builtin_macros | |
| parent | 8f359beca4e58bc3ae795a666301a8f47023044c (diff) | |
| download | rust-93fa8579c6430d54525e1905eafff4dbcf9b31b0.tar.gz rust-93fa8579c6430d54525e1905eafff4dbcf9b31b0.zip | |
Add asm label support to AST and HIR
Diffstat (limited to 'compiler/rustc_builtin_macros')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/asm.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/src/asm.rs b/compiler/rustc_builtin_macros/src/asm.rs index c5a73c31995..93eb3a9a43e 100644 --- a/compiler/rustc_builtin_macros/src/asm.rs +++ b/compiler/rustc_builtin_macros/src/asm.rs @@ -166,6 +166,9 @@ pub fn parse_asm_args<'a>( path: path.clone(), }; ast::InlineAsmOperand::Sym { sym } + } else if !is_global_asm && p.eat_keyword(sym::label) { + let block = p.parse_block()?; + ast::InlineAsmOperand::Label { block } } else if allow_templates { let template = p.parse_expr()?; // If it can't possibly expand to a string, provide diagnostics here to include other |
