about summary refs log tree commit diff
path: root/src/librustc_resolve
diff options
context:
space:
mode:
authorLuke Hinds <lukehinds@gmail.com>2016-08-09 22:31:57 +0100
committerLuke Hinds <lukehinds@gmail.com>2016-08-09 22:34:23 +0100
commit5c2c19aa89d5c855ac34a8978612fbd4f038872c (patch)
treebb776b78ca7ad3f3858235b5dadc369d15f9f5a8 /src/librustc_resolve
parentf0139140f6a2d1207cb21336b0faca69b5a337b2 (diff)
downloadrust-5c2c19aa89d5c855ac34a8978612fbd4f038872c.tar.gz
rust-5c2c19aa89d5c855ac34a8978612fbd4f038872c.zip
Update error message for E0253 #35512
Fixes #35512. Part of #35233.
Diffstat (limited to 'src/librustc_resolve')
-rw-r--r--src/librustc_resolve/resolve_imports.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs
index 6986f99926e..1e40aa7d187 100644
--- a/src/librustc_resolve/resolve_imports.rs
+++ b/src/librustc_resolve/resolve_imports.rs
@@ -505,7 +505,9 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
                 }
                 Success(binding) if !binding.is_importable() => {
                     let msg = format!("`{}` is not directly importable", target);
-                    span_err!(self.session, directive.span, E0253, "{}", &msg);
+                    struct_span_err!(self.session, directive.span, E0253, "{}", &msg)
+                        .span_label(directive.span, &format!("cannot be imported directly"))
+                        .emit();
                     // Do not import this illegal binding. Import a dummy binding and pretend
                     // everything is fine
                     self.import_dummy_binding(module, directive);