diff options
Diffstat (limited to 'src/hir/hir.cpp')
-rw-r--r-- | src/hir/hir.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hir/hir.cpp b/src/hir/hir.cpp index 361a40c8..ee66ed5b 100644 --- a/src/hir/hir.cpp +++ b/src/hir/hir.cpp @@ -1129,7 +1129,10 @@ const ::HIR::Module& ::HIR::Crate::get_mod_by_path(const Span& sp, const ::HIR:: return e; ) else { - BUG(sp, "Module path " << path << " didn't point to a module"); + if( ignore_last_node ) + BUG(sp, "Parent path of " << path << " didn't point to a module"); + else + BUG(sp, "Module path " << path << " didn't point to a module"); } } } |