diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-24 13:56:21 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-24 13:56:21 +0800 |
commit | e47ffe1632f7eb03cfb5991b1528ed0e03b8f77e (patch) | |
tree | e08f845c08cb8093d67dcac11f25fec6f9aff473 | |
parent | 71737150d4a6bd736257dda457398c77e10095bd (diff) | |
download | mrust-e47ffe1632f7eb03cfb5991b1528ed0e03b8f77e.tar.gz |
Expand - Fix double-insertion of prelude
-rw-r--r-- | src/expand/mod.cpp | 2 |
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), "", {}); } |