Skip to content

Commit

Permalink
Remove duplicated path_to_string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
mitaa committed Aug 12, 2015
1 parent f357d55 commit d81feb8
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5683,13 +5683,9 @@ impl<'tcx> ctxt<'tcx> {
&format!("a default was defined here..."));
}
(_, _) => {
let elems = csearch::get_item_path(self, expected.def_id)
.into_iter()
.map(|p| p.to_string())
.collect::<Vec<_>>();
self.sess.note(
&format!("a default is defined on `{}`",
elems.join("::")));
self.item_path_str(expected.def_id)));
}
}

Expand All @@ -5704,13 +5700,9 @@ impl<'tcx> ctxt<'tcx> {
&format!("a second default was defined here..."));
}
(_, _) => {
let elems = csearch::get_item_path(self, found.def_id)
.into_iter()
.map(|p| p.to_string())
.collect::<Vec<_>>();

self.sess.note(
&format!("a second default is defined on `{}`", elems.join(" ")));
&format!("a second default is defined on `{}`",
self.item_path_str(found.def_id)));
}
}

Expand Down

0 comments on commit d81feb8

Please sign in to comment.