Update E0260 to new error format

Updates #35515.
Part of #35233.

r? @jonathandturner
上级 86dde9bb
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册