summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-18 08:59:41 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-18 08:59:59 +0800
commit48e99abaf3e22bb95d322f527f4cf154e9ccef66 (patch)
treec7cea98f62bca632e52430b46a9c2bd6b8caa62b /src/resolve
parent6511ff4ec666f5bb040d07df85dbd4b02d9c9f0b (diff)
downloadmrust-48e99abaf3e22bb95d322f527f4cf154e9ccef66.tar.gz
AST - Load referenced crates in anon modules
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/index.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp
index 421f4ae1..39ae4ff2 100644
--- a/src/resolve/index.cpp
+++ b/src/resolve/index.cpp
@@ -122,6 +122,7 @@ void Resolve_Index_Module_Base(const AST::Crate& crate, AST::Module& mod)
_add_item(i.data.span, mod, IndexName::Namespace, i.name, i.is_pub, mv$(p));
),
(Crate,
+ ASSERT_BUG(i.data.span, crate.m_extern_crates.count(e.name) > 0, "Referenced crate '" << e.name << "' isn't loaded");
p.bind( ::AST::PathBinding::make_Crate({ &crate.m_extern_crates.at(e.name) }) );
_add_item(i.data.span, mod, IndexName::Namespace, i.name, i.is_pub, mv$(p));
),