diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-22 10:31:16 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-22 16:00:27 +0800 |
commit | 5a20d91b53d7889a5be8ed9dabeccbac0371f121 (patch) | |
tree | e66c887acbb3f15ee560851792f964939ade8470 /src/resolve | |
parent | e29fa8f3a2b429ed2da10bd941c52cb80c8bc859 (diff) | |
download | mrust-5a20d91b53d7889a5be8ed9dabeccbac0371f121.tar.gz |
Expand - #[prelude_import] support
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/index.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp index 39ae4ff2..66a9ec3d 100644 --- a/src/resolve/index.cpp +++ b/src/resolve/index.cpp @@ -404,11 +404,12 @@ void Resolve_Index_Module_Wildcard(AST::Crate& crate, AST::Module& mod, bool han const auto& hmod = *e.hir; Resolve_Index_Module_Wildcard__glob_in_hir_mod(sp, crate, mod, hmod, i_data.path, i.is_pub); } + else if( e.module_ == &mod ) { + // NOTE: Happens in libcore's prelude due to `#[prelude_import] use prelude::v1::*; + //ERROR(sp, E0000, "Glob import of self"); + } else { - if( e.module_ == &mod ) { - ERROR(sp, E0000, "Glob import of self"); - } // 1. Begin indexing of this module if it is not already indexed assert( e.module_->m_index_populated != 0 ); if( e.module_->m_index_populated == 1 ) |