about summary refs log tree commit diff
path: root/compiler/rustc_hir_pretty
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-04-29 20:07:10 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-05-03 09:14:27 +1000
commit760cf8d3afd446e9a5f3dc1af006548a0da5686c (patch)
treedd8961716591c538784e7132fe641f8345a822a9 /compiler/rustc_hir_pretty
parent3896ad0acd53fa62cab711d20af8dec1f3e944a1 (diff)
downloadrust-760cf8d3afd446e9a5f3dc1af006548a0da5686c.tar.gz
rust-760cf8d3afd446e9a5f3dc1af006548a0da5686c.zip
Fix hir pretty-printing of `global_asm!`.
One of the boxes isn't closed, and this causes everything after it to be
over-indented.
Diffstat (limited to 'compiler/rustc_hir_pretty')
-rw-r--r--compiler/rustc_hir_pretty/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs
index f4076e1114b..d119402222b 100644
--- a/compiler/rustc_hir_pretty/src/lib.rs
+++ b/compiler/rustc_hir_pretty/src/lib.rs
@@ -654,10 +654,11 @@ impl<'a> State<'a> {
                 self.bclose(item.span, cb);
             }
             hir::ItemKind::GlobalAsm { asm, .. } => {
-                // FIXME(nnethercote): `ib` is unclosed
-                let (cb, _ib) = self.head("global_asm!");
+                let (cb, ib) = self.head("global_asm!");
                 self.print_inline_asm(asm);
-                self.end(cb)
+                self.word(";");
+                self.end(cb);
+                self.end(ib);
             }
             hir::ItemKind::TyAlias(ident, ty, generics) => {
                 let (cb, ib) = self.head("type");