mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-20 19:47:33 +00:00
Auto merge of #32117 - mitaa:patch-3, r=alexcrichton
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
This commit is contained in:
commit
c9629d61c6
@ -1454,7 +1454,7 @@ impl<'a> Item<'a> {
|
|||||||
// has anchors for the line numbers that we're linking to.
|
// has anchors for the line numbers that we're linking to.
|
||||||
} else if self.item.def_id.is_local() {
|
} else if self.item.def_id.is_local() {
|
||||||
self.cx.local_sources.get(&PathBuf::from(&self.item.source.filename)).map(|path| {
|
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,
|
root = self.cx.root_path,
|
||||||
krate = self.cx.layout.krate,
|
krate = self.cx.layout.krate,
|
||||||
path = path,
|
path = path,
|
||||||
|
Loading…
Reference in New Issue
Block a user