public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] dump: Fix module dumping
@ 2022-10-15  9:16 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-10-15  9:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:25d243dd18afe734626e2eac482409aaefb6d24d

commit 25d243dd18afe734626e2eac482409aaefb6d24d
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date:   Fri Oct 14 16:55:47 2022 +0200

    dump: Fix module dumping
    
    Co-authored-by: jdupak <dev@jakubdupak.com>

Diff:
---
 gcc/rust/ast/rust-ast-dump.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index d8e9c8d0511..d4eb5166beb 100644
--- a/gcc/rust/ast/rust-ast-dump.cc
+++ b/gcc/rust/ast/rust-ast-dump.cc
@@ -684,11 +684,10 @@ Dump::visit (Method &method)
 void
 Dump::visit (Module &module)
 {
-  indentation.increment ();
-
-  stream << indentation;
   emit_visibility (module.get_visibility ());
-  stream << "mod" << module.get_name () << " {\n";
+  stream << "mod " << module.get_name () << " {\n";
+
+  indentation.increment ();
 
   for (auto &item : module.get_items ())
     {
@@ -698,6 +697,7 @@ Dump::visit (Module &module)
     }
 
   indentation.decrement ();
+
   stream << indentation << "}\n";
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-15  9:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-15  9:16 [gcc/devel/rust/master] dump: Fix module dumping Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).