diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-01 16:54:23 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-01 16:54:23 +0800 |
commit | 5acc77c720f46814a829e2f106db08ad51a820d2 (patch) | |
tree | 5ae02ec616ffc20d40b4eeaf19ceb0ccf5574080 /src/hir/hir.cpp | |
parent | bf2f4a5483c6e6c36718c287f21759a294682e60 (diff) | |
download | mrust-5acc77c720f46814a829e2f106db08ad51a820d2.tar.gz |
HIR - Look for impls in extern crates
Diffstat (limited to 'src/hir/hir.cpp')
-rw-r--r-- | src/hir/hir.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/hir/hir.cpp b/src/hir/hir.cpp index 6b50c0f2..14a84d86 100644 --- a/src/hir/hir.cpp +++ b/src/hir/hir.cpp @@ -505,6 +505,12 @@ bool ::HIR::Crate::find_trait_impls(const ::HIR::SimplePath& trait, const ::HIR: } } } + for( const auto& ec : this->m_ext_crates ) + { + if( ec.second->find_trait_impls(trait, type, ty_res, callback) ) { + return true; + } + } return false; } bool ::HIR::Crate::find_type_impls(const ::HIR::TypeRef& type, t_cb_resolve_type ty_res, ::std::function<bool(const ::HIR::TypeImpl&)> callback) const @@ -517,5 +523,12 @@ bool ::HIR::Crate::find_type_impls(const ::HIR::TypeRef& type, t_cb_resolve_type } } } + for( const auto& ec : this->m_ext_crates ) + { + DEBUG("- " << ec.first); + if( ec.second->find_type_impls(type, ty_res, callback) ) { + return true; + } + } return false; } |