aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-10-14 16:55:47 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2022-10-14 18:01:03 +0200
commit25d243dd18afe734626e2eac482409aaefb6d24d (patch)
tree64eb964f9747003b416625dfc1b28555b3d23f60
parentb6d4c62a84553f79fef12a9a5a9a305a560259dc (diff)
downloadgcc-25d243dd18afe734626e2eac482409aaefb6d24d.zip
gcc-25d243dd18afe734626e2eac482409aaefb6d24d.tar.gz
gcc-25d243dd18afe734626e2eac482409aaefb6d24d.tar.bz2
dump: Fix module dumping
Co-authored-by: jdupak <dev@jakubdupak.com>
-rw-r--r--gcc/rust/ast/rust-ast-dump.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index d8e9c8d..d4eb516 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";
}