Update E0428 to new format
This commit is contained in:
parent
413ada3040
commit
3b64cf669c
2 changed files with 10 additions and 3 deletions
|
|
@ -3382,7 +3382,11 @@ impl<'a> Resolver<'a> {
|
|||
},
|
||||
(true, _) | (_, true) => struct_span_err!(self.session, span, E0260, "{}", msg),
|
||||
_ => match (old_binding.is_import(), binding.is_import()) {
|
||||
(false, false) => struct_span_err!(self.session, span, E0428, "{}", msg),
|
||||
(false, false) => {
|
||||
let mut e = struct_span_err!(self.session, span, E0428, "{}", msg);
|
||||
e.span_label(span, &format!("already defined"));
|
||||
e
|
||||
},
|
||||
(true, true) => {
|
||||
let mut e = struct_span_err!(self.session, span, E0252, "{}", msg);
|
||||
e.span_label(span, &format!("already imported"));
|
||||
|
|
|
|||
|
|
@ -8,9 +8,12 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
struct Bar;
|
||||
struct Bar; //~ previous definition of `Bar` here
|
||||
//~| previous definition of `Bar` here
|
||||
struct Bar; //~ ERROR E0428
|
||||
//~^ ERROR E0428
|
||||
//~| NOTE already defined
|
||||
//~| ERROR E0428
|
||||
//~| NOTE already defined
|
||||
|
||||
fn main () {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue