diff options
Diffstat (limited to 'src/librustc_resolve/lib.rs')
| -rw-r--r-- | src/librustc_resolve/lib.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 5216156c0ca..ffc783ae9f2 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -3731,9 +3731,16 @@ impl<'a> Resolver<'a> { def, path.len() - i - 1 )); } else { + let label = format!( + "`{}` is {} {}, not a module", + ident, + def.article(), + def.kind_name(), + ); + return PathResult::Failed { span: ident.span, - label: format!("not a module `{}`", ident), + label, suggestion: None, is_error_from_last_segment: is_last, }; |
