Skip to content

Commit

Permalink
Rollup merge of #92947 - vacuus:rustdoc-core-visit-path, r=camelid
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Jan 18, 2022
2 parents b05be97 + 47de5b4 commit 71e5bfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ impl<'tcx> Visitor<'tcx> for EmitIgnoredResolutionErrors<'tcx> {
"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,
Expand Down

0 comments on commit 71e5bfe

Please sign in to comment.