diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-09-29 08:26:36 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-09-29 08:26:36 +0800 |
commit | 92c1dde06ce062af953a522200d6385d63712d28 (patch) | |
tree | e0d2e08ff0d83b1a7634ed38ec97a191f4855bad /src/expand/mod.cpp | |
parent | cd1ff0bc296f9192c33b494421e4a86d532ceb70 (diff) | |
download | mrust-92c1dde06ce062af953a522200d6385d63712d28.tar.gz |
Expand - Load crates that were conditionally included
Diffstat (limited to 'src/expand/mod.cpp')
-rw-r--r-- | src/expand/mod.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/expand/mod.cpp b/src/expand/mod.cpp index 57b44479..959cef86 100644 --- a/src/expand/mod.cpp +++ b/src/expand/mod.cpp @@ -1058,6 +1058,10 @@ void Expand_Mod(::AST::Crate& crate, LList<const AST::Module*> modstack, ::AST:: ), (Crate, // Can't recurse into an `extern crate` + if(crate.m_extern_crates.count(e.name) == 0) + { + e.name = crate.load_extern_crate( i.data.span, e.name ); + } ), (Struct, |