diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-10-14 16:55:47 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:35 +0100 |
commit | 2f16df1b443329694d1daf3e02987841a0857ede (patch) | |
tree | 74839a031ecf44bd222be9a239bad5f3183cb1f5 /gcc/rust | |
parent | 31150a6366dbd5b3028ffd99942d8a84081c7842 (diff) | |
download | gcc-2f16df1b443329694d1daf3e02987841a0857ede.zip gcc-2f16df1b443329694d1daf3e02987841a0857ede.tar.gz gcc-2f16df1b443329694d1daf3e02987841a0857ede.tar.bz2 |
gccrs: dump: Fix module dumping
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Fix formatting when dumping modules.
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 8 |
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 653c1d9..1e7a235 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -810,11 +810,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 ()) { @@ -824,6 +823,7 @@ Dump::visit (Module &module) } indentation.decrement (); + stream << indentation << "}\n"; } |