From fd4bbcabe8f4c38f6b2cab5a856d1afc278b04de Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 16 Apr 2023 23:12:25 +0200 Subject: [PATCH] Actually bring back LRU limit for macro_expand query --- crates/hir/src/db.rs | 2 +- crates/ide-db/src/lib.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/hir/src/db.rs b/crates/hir/src/db.rs index 7ec27af04b9..e0cde689fed 100644 --- a/crates/hir/src/db.rs +++ b/crates/hir/src/db.rs @@ -7,7 +7,7 @@ pub use hir_expand::db::{ AstIdMapQuery, ExpandDatabase, ExpandDatabaseStorage, ExpandProcMacroQuery, HygieneFrameQuery, InternMacroCallQuery, MacroArgTextQuery, MacroDefQuery, MacroExpandQuery, - ParseMacroExpansionQuery, + ParseMacroExpansionErrorQuery, ParseMacroExpansionQuery, }; pub use hir_ty::db::*; diff --git a/crates/ide-db/src/lib.rs b/crates/ide-db/src/lib.rs index 1235449b803..a70a91c99e2 100644 --- a/crates/ide-db/src/lib.rs +++ b/crates/ide-db/src/lib.rs @@ -152,6 +152,7 @@ pub fn update_parse_query_lru_capacity(&mut self, lru_capacity: Option) { let lru_capacity = lru_capacity.unwrap_or(base_db::DEFAULT_LRU_CAP); base_db::ParseQuery.in_db_mut(self).set_lru_capacity(lru_capacity); hir::db::ParseMacroExpansionQuery.in_db_mut(self).set_lru_capacity(lru_capacity); + hir::db::MacroExpandQuery.in_db_mut(self).set_lru_capacity(lru_capacity); } pub fn update_lru_capacities(&mut self, lru_capacities: &FxHashMap, usize>) { @@ -201,6 +202,7 @@ macro_rules! update_lru_capacity_per_query { // hir_db::MacroExpandQuery hir_db::ExpandProcMacroQuery hir_db::HygieneFrameQuery + hir_db::ParseMacroExpansionErrorQuery // DefDatabase hir_db::FileItemTreeQuery