Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #21151 from ChayimFriedman2/no-cache-prime
fix: Don't run cache priming when disabled in settings
Shoyu Vanilla (Flint) 5 months ago
parent 517de9f · parent f0ba503 · commit 832e7bd
-rw-r--r--crates/rust-analyzer/src/main_loop.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 7b339fa31b..8b4748ddb3 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -485,8 +485,8 @@ impl GlobalState {
}
// delay initial cache priming until proc macros are loaded, or we will load up a bunch of garbage into salsa
let proc_macros_loaded = self.config.prefill_caches()
- && !self.config.expand_proc_macros()
- || self.fetch_proc_macros_queue.last_op_result().copied().unwrap_or(false);
+ && (!self.config.expand_proc_macros()
+ || self.fetch_proc_macros_queue.last_op_result().copied().unwrap_or(false));
if proc_macros_loaded {
self.prime_caches_queue.request_op("became quiescent".to_owned(), ());
}