diff options
author | John Hodge <tpg@mutabah.net> | 2016-06-06 17:25:17 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-06-06 17:25:17 +0800 |
commit | bfec0115e412b584822d78b71f8fc9e30467d5dc (patch) | |
tree | 8aa0fb102208aee1423761649628e0f6ca43d9be /src/hir/from_ast.cpp | |
parent | 0821649dd024ae715769daa30d1d85fdd13e576b (diff) | |
download | mrust-bfec0115e412b584822d78b71f8fc9e30467d5dc.tar.gz |
HIR - Maintain trait list, use it for method lookup
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r-- | src/hir/from_ast.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp index 9a9b7a85..0c094484 100644 --- a/src/hir/from_ast.cpp +++ b/src/hir/from_ast.cpp @@ -824,6 +824,12 @@ void _add_mod_val_item(::HIR::Module& mod, ::std::string name, bool is_pub, ::H // TODO: Impl blocks // TODO: Populate trait list + for(const auto& item : module.m_type_items) + { + if( item.second.path.binding().is_Trait() ) { + mod.m_traits.push_back( LowerHIR_SimplePath(Span(), item.second.path) ); + } + } return mod; } |