summaryrefslogtreecommitdiff
path: root/src/resolve/index.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-30 22:00:26 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-30 22:00:26 +0800
commit86bbb1aff4b4375e45b5fb04e586f81ff98edb95 (patch)
tree45eda1e3ca54ad89c42fdf53d1e38f0e28030d40 /src/resolve/index.cpp
parent737e1e2c4385852221968dee8fe21be09c342e24 (diff)
downloadmrust-86bbb1aff4b4375e45b5fb04e586f81ff98edb95.tar.gz
Resolve - (minor) Debug
Diffstat (limited to 'src/resolve/index.cpp')
-rw-r--r--src/resolve/index.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp
index 5ebb2808..a8f92027 100644
--- a/src/resolve/index.cpp
+++ b/src/resolve/index.cpp
@@ -40,13 +40,15 @@ enum class IndexName
void _add_item(const Span& sp, AST::Module& mod, IndexName location, const ::std::string& name, bool is_pub, ::AST::Path ir, bool error_on_collision=true)
{
- DEBUG("Add " << location << " item '" << name << "': " << ir);
auto& list = get_mod_index(mod, location);
bool was_import = (ir != mod.path() + name);
if( was_import ) {
DEBUG("### Import " << name << " = " << ir);
}
+ else {
+ DEBUG("Add " << location << " item '" << name << "': " << ir);
+ }
if( false == list.insert(::std::make_pair(name, ::AST::Module::IndexEnt { is_pub, was_import, mv$(ir) } )).second )
{
if( error_on_collision )
@@ -55,7 +57,7 @@ void _add_item(const Span& sp, AST::Module& mod, IndexName location, const ::std
}
else
{
- DEBUG("Name collision " << mod.path() << ", ignored");
+ DEBUG("Name collision in " << mod.path() << " - '" << name << "', ignored");
}
}
}