summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resolve/use.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp
index 5e1fce6d..9c27711d 100644
--- a/src/resolve/use.cpp
+++ b/src/resolve/use.cpp
@@ -688,7 +688,10 @@ namespace {
auto b = Resolve_Use_GetBinding_Mod(span, crate, *mod, nodes[i].name(), parent_modules, Lookup::Type);
TU_MATCH_DEF(::AST::PathBinding, (b), (e),
(
- ERROR(span, E0000, "Unexpected item type in import");
+ ERROR(span, E0000, "Unexpected item type " << b.tag_str() << " in import of " << path);
+ ),
+ (Unbound,
+ ERROR(span, E0000, "Cannot find component " << i << " of " << path);
),
(Crate,
// TODO: Mangle the original path (or return a new path somehow)