Remove some span_of_impl+unwrap
This commit is contained in:
parent
03bfbe1fb3
commit
4b890f3474
1 changed files with 3 additions and 3 deletions
|
@ -76,17 +76,17 @@ impl<'tcx> InherentOverlapChecker<'tcx> {
|
|||
let name = item1.ident(self.tcx).normalize_to_macros_2_0();
|
||||
let mut err = struct_span_err!(
|
||||
self.tcx.sess,
|
||||
self.tcx.span_of_impl(item1.def_id).unwrap(),
|
||||
self.tcx.def_span(item1.def_id),
|
||||
E0592,
|
||||
"duplicate definitions with name `{}`",
|
||||
name
|
||||
);
|
||||
err.span_label(
|
||||
self.tcx.span_of_impl(item1.def_id).unwrap(),
|
||||
self.tcx.def_span(item1.def_id),
|
||||
format!("duplicate definitions for `{}`", name),
|
||||
);
|
||||
err.span_label(
|
||||
self.tcx.span_of_impl(item2.def_id).unwrap(),
|
||||
self.tcx.def_span(item2.def_id),
|
||||
format!("other definition for `{}`", name),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue