Store links in Cache instead of on items directly
Items are first built after rustdoc creates the TyCtxt. To allow resolving the links before the TyCtxt is built, the links can't be stored on `clean::Item` directly.
This commit is contained in:
parent
16143d1067
commit
9e11902eff
4 changed files with 82 additions and 82 deletions
|
@ -120,6 +120,11 @@ crate struct Cache {
|
|||
// when gathering trait documentation on a type, hold impls here while
|
||||
// folding and add them to the cache later on if we find the trait.
|
||||
orphan_trait_impls: Vec<(DefId, FxHashSet<DefId>, Impl)>,
|
||||
|
||||
/// All intra-doc links resolved so far.
|
||||
///
|
||||
/// Links are indexed by the DefId of the item they document.
|
||||
crate intra_doc_links: BTreeMap<DefId, Vec<clean::ItemLink>>,
|
||||
}
|
||||
|
||||
/// This struct is used to wrap the `cache` and `tcx` in order to run `DocFolder`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue