diff options
| author | Luke Hinds <lukehinds@gmail.com> | 2016-08-09 22:31:57 +0100 |
|---|---|---|
| committer | Luke Hinds <lukehinds@gmail.com> | 2016-08-09 22:34:23 +0100 |
| commit | 5c2c19aa89d5c855ac34a8978612fbd4f038872c (patch) | |
| tree | bb776b78ca7ad3f3858235b5dadc369d15f9f5a8 /src/librustc_resolve | |
| parent | f0139140f6a2d1207cb21336b0faca69b5a337b2 (diff) | |
| download | rust-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.rs | 4 |
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); |
