Rollup merge of #92947 - vacuus:rustdoc-core-visit-path, r=camelid
rustdoc: Use `intersperse` in a `visit_path` function (~~Is there a better way to word the title?~~ Eh, this works, I guess.) I'm surprised that the compiler didn't complain when I left out the `.to_string()`, but hey, if it works then it works.
This commit is contained in:
commit
71e5bfed70
@ -492,9 +492,9 @@ fn visit_path(&mut self, path: &'tcx Path<'_>, _id: HirId) {
|
|||||||
"could not resolve path `{}`",
|
"could not resolve path `{}`",
|
||||||
path.segments
|
path.segments
|
||||||
.iter()
|
.iter()
|
||||||
.map(|segment| segment.ident.as_str().to_string())
|
.map(|segment| segment.ident.as_str())
|
||||||
.collect::<Vec<_>>()
|
.intersperse("::")
|
||||||
.join("::")
|
.collect::<String>()
|
||||||
);
|
);
|
||||||
let mut err = rustc_errors::struct_span_err!(
|
let mut err = rustc_errors::struct_span_err!(
|
||||||
self.tcx.sess,
|
self.tcx.sess,
|
||||||
|
Loading…
Reference in New Issue
Block a user