Rollup merge of #36100 - 0xmohit:pr/error-code-E0260, r=jonathandturner
Update E0260 to new error format Updates #35515. Part of #35233. r? @jonathandturner
This commit is contained in:
commit
eb33044449
2 changed files with 9 additions and 2 deletions
|
|
@ -3354,7 +3354,11 @@ impl<'a> Resolver<'a> {
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue