Skip to content

Commit

Permalink
Auto merge of #32117 - mitaa:patch-3, r=alexcrichton
Browse files Browse the repository at this point in the history
rustdoc: correct src-link url

It would have been nice for htmldocck to catch this, especially since there are rustdoc tests specifically for checking src-links.

fixes #32113
  • Loading branch information
bors committed Mar 10, 2016
2 parents c1fb50f + f1cf2a6 commit c9629d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ impl<'a> Item<'a> {
// has anchors for the line numbers that we're linking to.
} else if self.item.def_id.is_local() {
self.cx.local_sources.get(&PathBuf::from(&self.item.source.filename)).map(|path| {
format!("{root}src/{krate}/{path}.html#{href}",
format!("{root}src/{krate}/{path}#{href}",
root = self.cx.root_path,
krate = self.cx.layout.krate,
path = path,
Expand Down

0 comments on commit c9629d6

Please sign in to comment.