diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-08 15:29:59 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-08 15:29:59 +0800 |
commit | b0dff9731a56ca33d0d6326d402af6d4c54963ec (patch) | |
tree | c5432b021a7b17452e967c3fd04b73bb55c4940b /src/resolve/index.cpp | |
parent | 391d72b800942aeb55ba77952915a81b2731e970 (diff) | |
download | mrust-b0dff9731a56ca33d0d6326d402af6d4c54963ec.tar.gz |
HIR+AST - Store/Load/Use extern crate list from loaded crates
Diffstat (limited to 'src/resolve/index.cpp')
-rw-r--r-- | src/resolve/index.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp index a9751de3..089edd66 100644 --- a/src/resolve/index.cpp +++ b/src/resolve/index.cpp @@ -304,6 +304,7 @@ void Resolve_Index_Module_Wildcard__glob_in_hir_mod(const Span& sp, const AST::C const auto& spath = ve.ent.as_Import(); p = hir_to_ast( spath ); + ASSERT_BUG(sp, crate.m_extern_crates.count(spath.m_crate_name) == 1, "Crate " << spath.m_crate_name << " is not loaded"); const auto* hmod = &crate.m_extern_crates.at(spath.m_crate_name).m_hir->m_root_module; for(unsigned int i = 0; i < spath.m_components.size()-1; i ++) { const auto& it = hmod->m_mod_items.at( spath.m_components[i] ); |