Remove duplicated path_to_string conversion

This commit is contained in:
mitaa 2015-08-11 19:22:22 +02:00
parent f357d559ca
commit d81feb85f7

View file

@ -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)));
}
}
@ -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)));
}
}