Update E0260 to new error format

Updates #35515.
Part of #35233.

r? @jonathandturner
This commit is contained in:
Mohit Agarwal
2016-08-29 16:20:08 +05:30
parent 86dde9bbda
commit d6fc2baa11
2 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -3354,7 +3354,11 @@ fn report_conflict(&self,
e.span_label(span, &"already imported");
e
},
(true, _) | (_, true) => struct_span_err!(self.session, span, E0260, "{}", msg),
(true, _) | (_, true) => {
let mut e = struct_span_err!(self.session, span, E0260, "{}", msg);
e.span_label(span, &format!("`{}` already imported", name));
e
},
_ => match (old_binding.is_import(), binding.is_import()) {
(false, false) => {
let mut e = struct_span_err!(self.session, span, E0428, "{}", msg);
+4 -1
View File
@@ -9,8 +9,11 @@
// except according to those terms.
extern crate collections;
//~^ NOTE previous import of `collections` here
mod collections { //~ ERROR E0260
mod collections {
//~^ ERROR `collections` has already been imported in this module [E0260]
//~| NOTE `collections` already imported
pub trait MyTrait {
fn do_something();
}