diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-25 11:33:14 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-25 11:33:14 +0800 |
commit | b698207664e45b9b0bb9944b5c97084dfc593ed6 (patch) | |
tree | 6408e43a422aafcb65bbd9ca83555e32df18c3ff /src/convert/resolve.cpp | |
parent | 303d0a93372281c471e450a7c6938ab2600d5e14 (diff) | |
download | mrust-b698207664e45b9b0bb9944b5c97084dfc593ed6.tar.gz |
HACK - Handle the case of core::iter::order importing core::ord, but also defining an 'ord' function
Diffstat (limited to 'src/convert/resolve.cpp')
-rw-r--r-- | src/convert/resolve.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/convert/resolve.cpp b/src/convert/resolve.cpp index be2bd1bb..66dc1b3a 100644 --- a/src/convert/resolve.cpp +++ b/src/convert/resolve.cpp @@ -232,7 +232,8 @@ void CPathResolver::end_scope() // > Search module-level definitions
bool lookup_path_in_module(const AST::Crate& crate, const AST::Module& module, const AST::Path& mod_path, AST::Path& path)
{
- auto item = module.find_item(path[0].name(), false);
+ // - Allow leaf nodes if path is a single node, don't skip private wildcard imports
+ auto item = module.find_item(path[0].name(), (path.size() == 1), false);
switch(item.type())
{
case AST::Module::ItemRef::ITEM_none:
|