aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-03-25 17:41:46 +0000
committerAleksey Kladov <[email protected]>2020-03-25 18:35:46 +0000
commit9f53cec1da6ae9ed8735e28fca09837a0cef7667 (patch)
tree6b60bb49f5b7468cf3165cc74472309e9c6a92b1 /crates/ra_hir_def
parent3d38d4dc9445de783d5efbc72fbdceaa094f23c3 (diff)
Cleanup memory usage stats
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/db.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs
index 7f8c1ea21..5dc7395f5 100644
--- a/crates/ra_hir_def/src/db.rs
+++ b/crates/ra_hir_def/src/db.rs
@@ -48,6 +48,7 @@ pub trait DefDatabase: InternDatabase + AstDatabase + Upcast<dyn AstDatabase> {
48 fn raw_items(&self, file_id: HirFileId) -> Arc<RawItems>; 48 fn raw_items(&self, file_id: HirFileId) -> Arc<RawItems>;
49 49
50 #[salsa::invoke(crate_def_map_wait)] 50 #[salsa::invoke(crate_def_map_wait)]
51 #[salsa::transparent]
51 fn crate_def_map(&self, krate: CrateId) -> Arc<CrateDefMap>; 52 fn crate_def_map(&self, krate: CrateId) -> Arc<CrateDefMap>;
52 53
53 #[salsa::invoke(CrateDefMap::crate_def_map_query)] 54 #[salsa::invoke(CrateDefMap::crate_def_map_query)]
@@ -109,12 +110,6 @@ pub trait DefDatabase: InternDatabase + AstDatabase + Upcast<dyn AstDatabase> {
109 fn documentation(&self, def: AttrDefId) -> Option<Documentation>; 110 fn documentation(&self, def: AttrDefId) -> Option<Documentation>;
110} 111}
111 112
112// impl<T: DefDatabase> Upcast<dyn AstDatabase> for T {
113// fn upcast(&self) -> &dyn AstDatabase {
114// &*self
115// }
116// }
117
118fn crate_def_map_wait(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { 113fn crate_def_map_wait(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> {
119 let _p = profile("crate_def_map:wait"); 114 let _p = profile("crate_def_map:wait");
120 db.crate_def_map_query(krate) 115 db.crate_def_map_query(krate)