diff options
author | John Hodge <tpg@ucc.asn.au> | 2018-06-03 14:57:05 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-06-03 14:57:05 +0800 |
commit | bf8f8b4b4a9fe273451be59f68acafbe61968b83 (patch) | |
tree | 82993550cb3c88de0edbd55d79e4ea8e8cefffac /src/ast/dump.cpp | |
parent | 39b3cf53798683e496804f8322da2254b10850f4 (diff) | |
parent | a7fb27789a2b34543851d207120e2c0001ee9c27 (diff) | |
download | mrust-bf8f8b4b4a9fe273451be59f68acafbe61968b83.tar.gz |
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'src/ast/dump.cpp')
-rw-r--r-- | src/ast/dump.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ast/dump.cpp b/src/ast/dump.cpp index 7026f61d..73b332c0 100644 --- a/src/ast/dump.cpp +++ b/src/ast/dump.cpp @@ -560,7 +560,7 @@ private: m_os << ")"; } - void print_attrs(const AST::MetaItems& attrs); + void print_attrs(const AST::AttributeList& attrs); void print_params(const AST::GenericParams& params); void print_bounds(const AST::GenericParams& params); void print_pattern_tuple(const AST::Pattern::TuplePat& v, bool is_refutable); @@ -579,7 +579,7 @@ void Dump_Rust(const char *filename, const AST::Crate& crate) printer.handle_module(crate.root_module()); } -void RustPrinter::print_attrs(const AST::MetaItems& attrs) +void RustPrinter::print_attrs(const AST::AttributeList& attrs) { for(const auto& a : attrs.m_items) { @@ -829,6 +829,9 @@ void RustPrinter::print_bounds(const AST::GenericParams& params) m_os << indent(); TU_MATCH(AST::GenericBound, (b), (ent), + (None, + m_os << "/*-*/"; + ), (Lifetime, m_os << "'" << ent.test << ": '" << ent.bound; ), @@ -836,10 +839,7 @@ void RustPrinter::print_bounds(const AST::GenericParams& params) m_os << ent.type << ": '" << ent.bound; ), (IsTrait, - if( ent.hrls.size() > 0 ) { - m_os << "for<'" << ::join(", '", ent.hrls) << "> "; - } - m_os << ent.type << ": " << ent.trait; + m_os << ent.outer_hrbs << ent.type << ": " << ent.inner_hrbs << ent.trait; ), (MaybeTrait, m_os << ent.type << ": ?" << ent.trait; |