gccrs: ast: dump: fix extra newline in block without tail
authorDavid Faust <david.faust@oracle.com>
Thu, 13 Oct 2022 16:25:57 +0000 (09:25 -0700)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 21 Feb 2023 11:36:33 +0000 (12:36 +0100)
gcc/rust/ChangeLog:

* ast/rust-ast-dump.cc (Dump::visit): Fix block formatting.

gcc/rust/ast/rust-ast-dump.cc

index 7cbdfa2..3b00c9f 100644 (file)
@@ -498,11 +498,11 @@ Dump::visit (BlockExpr &expr)
     {
       stream << indentation;
       expr.get_tail_expr ()->accept_vis (*this);
-      stream << " /* tail expr */";
+      stream << " /* tail expr */\n";
     }
 
   indentation.decrement ();
-  stream << "\n" << indentation << "}\n";
+  stream << indentation << "}\n";
 }
 
 void