Handle asm const similar to inline const

This commit is contained in:
Gary Guo
2025-02-26 16:28:37 +00:00
parent 6e4adbed76
commit f482460f92
11 changed files with 95 additions and 68 deletions

View File

@@ -1414,7 +1414,8 @@ impl<'a> State<'a> {
hir::InlineAsmOperand::Const { ref anon_const } => {
s.word("const");
s.space();
s.print_anon_const(anon_const);
// Not using `print_inline_const` to avoid additional `const { ... }`
s.ann.nested(s, Nested::Body(anon_const.body))
}
hir::InlineAsmOperand::SymFn { ref expr } => {
s.word("sym_fn");