mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 00:47:18 +00:00
Actually bring back LRU limit for macro_expand query
This commit is contained in:
parent
76718ea2fc
commit
fd4bbcabe8
2 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,7 @@ pub use hir_def::db::*;
|
|||
pub use hir_expand::db::{
|
||||
AstIdMapQuery, ExpandDatabase, ExpandDatabaseStorage, ExpandProcMacroQuery, HygieneFrameQuery,
|
||||
InternMacroCallQuery, MacroArgTextQuery, MacroDefQuery, MacroExpandQuery,
|
||||
ParseMacroExpansionQuery,
|
||||
ParseMacroExpansionErrorQuery, ParseMacroExpansionQuery,
|
||||
};
|
||||
pub use hir_ty::db::*;
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ impl RootDatabase {
|
|||
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<Box<str>, usize>) {
|
||||
|
@ -201,6 +202,7 @@ impl RootDatabase {
|
|||
// hir_db::MacroExpandQuery
|
||||
hir_db::ExpandProcMacroQuery
|
||||
hir_db::HygieneFrameQuery
|
||||
hir_db::ParseMacroExpansionErrorQuery
|
||||
|
||||
// DefDatabase
|
||||
hir_db::FileItemTreeQuery
|
||||
|
|
Loading…
Reference in a new issue