Fix hir pretty-printing of global_asm!.
One of the boxes isn't closed, and this causes everything after it to be over-indented.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -27,5 +27,6 @@ mod expressions {
|
||||
mod items {
|
||||
/// ItemKind::GlobalAsm
|
||||
mod item_global_asm {/// ItemKind::GlobalAsm
|
||||
global_asm! (".globl my_asm_func") }
|
||||
global_asm! (".globl my_asm_func");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user