1
Fork 0

Fix invalid path generation in rustdoc search

This commit is contained in:
Guillaume Gomez 2018-04-29 21:32:53 +02:00
parent 96e182833b
commit a876d28b4a
3 changed files with 7 additions and 5 deletions

View file

@ -1427,7 +1427,7 @@ impl<'a> Cache {
}
if let Some(ref item_name) = item.name {
let path = self.paths.get(&item.def_id)
.map(|p| p.0.join("::").to_string())
.map(|p| p.0[..p.0.len() - 1].join("::"))
.unwrap_or("std".to_owned());
for alias in item.attrs.lists("doc")
.filter(|a| a.check_name("alias"))