rustdoc: Link to local reexportations of items
Within the documentation for a crate, all hyperlinks to reexported items don't go across crates, but rather to the items in the crate itself. This will allow references to Option in the standard library to link to the standard library's Option, instead of libcore's. This does mean that other crate's links for Option will still link to libcore's Option.
This commit is contained in:
parent
a96067077a
commit
837d4d8f35
2 changed files with 2 additions and 1 deletions
|
@ -797,6 +797,7 @@ impl DocFolder for Cache {
|
|||
// not a public item.
|
||||
let id = item.def_id.node;
|
||||
if !self.paths.contains_key(&item.def_id) ||
|
||||
!ast_util::is_local(item.def_id) ||
|
||||
self.public_items.contains(&id) {
|
||||
self.paths.insert(item.def_id,
|
||||
(self.stack.clone(), shortty(&item)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue