diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-06-02 18:59:25 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-06-07 12:30:23 +0200 |
commit | 88db3982bc2c38111077fe0adc93d8451bad2ca1 (patch) | |
tree | e6466e3fbbcc79ba1c3de476c92ad520ee186489 | |
parent | 9d81164aa0447c738fe0435de14ec9666a03d5da (diff) | |
download | gcc-88db3982bc2c38111077fe0adc93d8451bad2ca1.zip gcc-88db3982bc2c38111077fe0adc93d8451bad2ca1.tar.gz gcc-88db3982bc2c38111077fe0adc93d8451bad2ca1.tar.bz2 |
ast: Dump TraitImpl items
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index cdcb563..d1105c9 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -624,7 +624,21 @@ Dump::visit (InherentImpl &impl) void Dump::visit (TraitImpl &impl) -{} +{ + stream << "impl "; + impl.get_trait_path ().accept_vis (*this); + stream << " for "; + impl.get_type ()->accept_vis (*this); + + stream << " {\n"; + indentation.increment (); + + for (auto &item : impl.get_impl_items ()) + item->accept_vis (*this); + + indentation.decrement (); + stream << "\n}\n"; +} void Dump::visit (ExternalStaticItem &item) |