1
Fork 0

rustdoc: Store DefId's in ItemId on heap for decreasing Item's size

This commit is contained in:
Justus K 2021-06-26 20:47:33 +02:00
parent acd4dc2d0c
commit 45d3daece3
No known key found for this signature in database
GPG key ID: 8C62FE98A62FC462
16 changed files with 115 additions and 109 deletions

View file

@ -290,7 +290,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
// A crate has a module at its root, containing all items,
// which should not be indexed. The crate-item itself is
// inserted later on when serializing the search-index.
if item.def_id.index().map_or(false, |idx| idx != CRATE_DEF_INDEX) {
if item.def_id.as_def_id().map_or(false, |did| did.index != CRATE_DEF_INDEX) {
let desc = item.doc_value().map_or_else(String::new, |x| {
short_markdown_summary(&x.as_str(), &item.link_names(&self.cache))
});