1
Fork 0

chore(rustdoc): remove unused members of RenderType

Commit e629381653 removes the only place
these members variables are actually read.
This commit is contained in:
Michael Howell 2021-06-24 12:53:35 -07:00
parent e629381653
commit 14ca89446c
3 changed files with 7 additions and 52 deletions

View file

@ -128,7 +128,6 @@ crate struct Cache {
/// This struct is used to wrap the `cache` and `tcx` in order to run `DocFolder`.
struct CacheBuilder<'a, 'tcx> {
cache: &'a mut Cache,
empty_cache: Cache,
tcx: TyCtxt<'tcx>,
}
@ -173,7 +172,7 @@ impl Cache {
self.primitive_locations.insert(prim, def_id);
}
krate = CacheBuilder { tcx, cache: self, empty_cache: Cache::default() }.fold_crate(krate);
krate = CacheBuilder { tcx, cache: self }.fold_crate(krate);
for (trait_did, dids, impl_) in self.orphan_trait_impls.drain(..) {
if self.traits.contains_key(&trait_did) {
@ -302,7 +301,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
desc,
parent,
parent_idx: None,
search_type: get_index_search_type(&item, &self.empty_cache, self.tcx),
search_type: get_index_search_type(&item, self.tcx),
aliases: item.attrs.get_doc_aliases(),
});
}