mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Update E0260 to new error format
Updates #35515. Part of #35233. r? @jonathandturner
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user