Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/librustc_resolve/resolve_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/test/compile-fail/E0253.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ mod foo {
}
}

use foo::MyTrait::do_something; //~ ERROR E0253
use foo::MyTrait::do_something;
//~^ ERROR E0253
//~|NOTE not directly importable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be `| NOTE cannot be imported directly", no?

Copy link
Contributor Author

@lukehinds lukehinds Aug 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it now, with a new commit, but in hindsight I wonder if I should have done a commit --amend?, and it might cause a merge conflict? (clicked on the pencil above, and did a browser edit)

(apologies, I have got so used to working via gerrit, and github stumps me).

c974749


fn main() {}