From 25d243dd18afe734626e2eac482409aaefb6d24d Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Fri, 14 Oct 2022 16:55:47 +0200 Subject: dump: Fix module dumping Co-authored-by: jdupak --- gcc/rust/ast/rust-ast-dump.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/rust/ast') 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"; } -- cgit v1.1