diff options
author | John Hodge <tpg@mutabah.net> | 2016-05-29 08:50:39 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-05-29 08:50:39 +0800 |
commit | a8d2de3db9d9f92013d0ac6e52319b55590efea4 (patch) | |
tree | 1f85c37a21df5379518f2567a34eb3f174cb790f /src/hir/from_ast.cpp | |
parent | 727e254fe58274741036ca31f4c3eae2f3e1695a (diff) | |
download | mrust-a8d2de3db9d9f92013d0ac6e52319b55590efea4.tar.gz |
AST - Remove dead code, add lifetime params, fix param clobber
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r-- | src/hir/from_ast.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp index 26d7029f..bffafc48 100644 --- a/src/hir/from_ast.cpp +++ b/src/hir/from_ast.cpp @@ -319,7 +319,7 @@ ::HIR::SimplePath rv( e.crate ); for( const auto& node : e.nodes ) { - if( node.args().size() > 0 ) + if( ! node.args().is_empty() ) { if( allow_final_generic && &node == &e.nodes.back() ) { // Let it pass @@ -342,7 +342,10 @@ TU_IFLET(::AST::Path::Class, path.m_class, Absolute, e, auto sp = LowerHIR_SimplePath(path, true); ::HIR::PathParams params; - for(const auto& param : e.nodes.back().args()) { + const auto& src_params = e.nodes.back().args(); + //for(const auto& param : src_params.m_lifetimes) { + //} + for(const auto& param : src_params.m_types) { params.m_types.push_back( LowerHIR_Type(param) ); } // TODO: Lifetime params (not encoded in AST::PathNode as yet) |