summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-08-23 18:00:49 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-08-23 18:00:49 +0800
commit185959964b6f1e9f1b67d4eb8b2d1932096e2de2 (patch)
tree8c0535a0f8fb6e4779d65b9866525cb91394a689 /src/resolve
parent5d5f01ccf4ca176074af54dc73b8419ccf4d2ae2 (diff)
parent71b1ed79d938a40b7b1c5824674814fe31d78dac (diff)
downloadmrust-185959964b6f1e9f1b67d4eb8b2d1932096e2de2.tar.gz
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'src/resolve')
-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 be0c2ab8..5fd01214 100644
--- a/src/resolve/use.cpp
+++ b/src/resolve/use.cpp
@@ -696,7 +696,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)