rustdoc: correct src-link url

This commit is contained in:
mitaa 2016-03-08 08:07:57 +01:00
parent 8b7c3f20e8
commit f1cf2a6fcb

View File

@ -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,