summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-06-22 22:52:05 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-06-22 22:52:05 +0800
commita302814487c7e334f8abca5ee63d4b0a1378a62d (patch)
treedd155a563e5553bb83167247cb48169491ccecdb /src/resolve
parent2ac86edf6c9f9aa8559b265c2121581006f09eae (diff)
downloadmrust-a302814487c7e334f8abca5ee63d4b0a1378a62d.tar.gz
AST - Use constant crate paths in HIR metadata
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/use.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp
index cde9cd5f..64b673ce 100644
--- a/src/resolve/use.cpp
+++ b/src/resolve/use.cpp
@@ -541,11 +541,12 @@ namespace {
::AST::Path::Bindings Resolve_Use_GetBinding__ext(const Span& span, const ::AST::Crate& crate, const ::AST::Path& path, const ::HIR::Module& hmodr, unsigned int start)
{
::AST::Path::Bindings rv;
- TRACE_FUNCTION_F(path);
+ TRACE_FUNCTION_F(path << " offset " << start);
const auto& nodes = path.nodes();
const ::HIR::Module* hmod = &hmodr;
for(unsigned int i = start; i < nodes.size() - 1; i ++)
{
+ DEBUG("m_mod_items = {" << FMT_CB(ss, for(const auto& e : hmod->m_mod_items) ss << e.first << ", ";) << "}");
auto it = hmod->m_mod_items.find(nodes[i].name());
if( it == hmod->m_mod_items.end() ) {
// BZZT!
@@ -735,6 +736,7 @@ namespace {
}
::AST::Path::Bindings Resolve_Use_GetBinding__ext(const Span& span, const ::AST::Crate& crate, const ::AST::Path& path, const AST::ExternCrate& ec, unsigned int start)
{
+ DEBUG("Crate " << ec.m_name);
auto rv = Resolve_Use_GetBinding__ext(span, crate, path, ec.m_hir->m_root_module, start);
if( start + 1 == path.nodes().size() )
{