Derive block attributes from block item tree

This commit is contained in:
Lukas Wirth 2023-08-10 18:52:27 +02:00
parent 05b0612051
commit e5b23e3bc1
8 changed files with 41 additions and 27 deletions

View file

@ -82,6 +82,12 @@ pub trait DefDatabase: InternDatabase + ExpandDatabase + Upcast<dyn ExpandDataba
#[salsa::invoke(ItemTree::file_item_tree_query)]
fn file_item_tree(&self, file_id: HirFileId) -> Arc<ItemTree>;
#[salsa::invoke(ItemTree::block_item_tree_query)]
// FIXME: Investigate memory usage increase if this were not transparent
// Also make sure to `shrink_to_fit` if you do
#[salsa::transparent]
fn block_item_tree_query(&self, block_id: BlockId) -> Arc<ItemTree>;
#[salsa::invoke(crate_def_map_wait)]
#[salsa::transparent]
fn crate_def_map(&self, krate: CrateId) -> Arc<DefMap>;