diff options
author | John Hodge <tpg@mutabah.net> | 2017-08-22 21:21:44 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2017-08-22 21:21:44 +0800 |
commit | 251e49aef76e46af5005978ac25650aab4f94313 (patch) | |
tree | e9157442b901df2e5c20a56f25fe0fa187985f51 /src/resolve | |
parent | ae2c2e15bea28bd03efd70060fcb4c49e43477f6 (diff) | |
download | mrust-251e49aef76e46af5005978ac25650aab4f94313.tar.gz |
Resolve Use - (minor) Diagnostics fix when module cannot be found
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/use.cpp | 5 |
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) |