summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-24 13:56:21 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-24 13:56:21 +0800
commite47ffe1632f7eb03cfb5991b1528ed0e03b8f77e (patch)
treee08f845c08cb8093d67dcac11f25fec6f9aff473
parent71737150d4a6bd736257dda457398c77e10095bd (diff)
downloadmrust-e47ffe1632f7eb03cfb5991b1528ed0e03b8f77e.tar.gz
Expand - Fix double-insertion of prelude
-rw-r--r--src/expand/mod.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expand/mod.cpp b/src/expand/mod.cpp
index 179bc37b..8060d104 100644
--- a/src/expand/mod.cpp
+++ b/src/expand/mod.cpp
@@ -637,7 +637,7 @@ void Expand_Mod(bool is_early, ::AST::Crate& crate, LList<const AST::Module*> mo
for( const auto& mi: mod.macro_imports_res() )
DEBUG("- Imports '" << mi.name << "'");
- if( mod.m_insert_prelude && crate.m_prelude_path != AST::Path() ) {
+ if( is_early && mod.m_insert_prelude && crate.m_prelude_path != AST::Path() ) {
mod.add_alias(false, ::AST::UseStmt(Span(), crate.m_prelude_path), "", {});
}