about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2025-03-17 11:35:31 +0000
committerGitHub <noreply@github.com>2025-03-17 11:35:31 +0000
commit6c70045a66d8e4675422abe0232450f2239ab2cc (patch)
tree8166a0f1bbaaf7f8678b3ee142247c8fc3274673
parent27502d937d731ba5a4955a5a2711f3652778a123 (diff)
parentce23f737506f9c729a77c3d35283994dfb348d5e (diff)
downloadrust-6c70045a66d8e4675422abe0232450f2239ab2cc.tar.gz
rust-6c70045a66d8e4675422abe0232450f2239ab2cc.zip
Merge pull request #19384 from Veykril/push-yppplzzpoymr
fix: Fix stale `Building CrateGraph` report
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
index 0a716c09295..ce9e5c3f248 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
@@ -754,13 +754,11 @@ impl GlobalState {
             self.analysis_host.apply_change(change);
 
             self.finish_loading_crate_graph();
-            return;
+        } else {
+            change.set_crate_graph(crate_graph);
+            self.fetch_proc_macros_queue.request_op(cause, (change, proc_macro_paths));
         }
-        change.set_crate_graph(crate_graph);
-        self.fetch_proc_macros_queue.request_op(cause, (change, proc_macro_paths));
-    }
 
-    pub(crate) fn finish_loading_crate_graph(&mut self) {
         self.report_progress(
             "Building CrateGraph",
             crate::lsp::utils::Progress::End,
@@ -768,7 +766,9 @@ impl GlobalState {
             None,
             None,
         );
+    }
 
+    pub(crate) fn finish_loading_crate_graph(&mut self) {
         self.process_changes();
         self.reload_flycheck();
     }