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 `{}`",
|
||||
path.segments
|
||||
.iter()
|
||||
.map(|segment| segment.ident.as_str().to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join("::")
|
||||
.map(|segment| segment.ident.as_str())
|
||||
.intersperse("::")
|
||||
.collect::<String>()
|
||||
);
|
||||
let mut err = rustc_errors::struct_span_err!(
|
||||
self.tcx.sess,
|
||||
|
Loading…
Reference in New Issue
Block a user