Skip to content

Commit ce23f73

Browse files
committed
fix: Fix stale Building CrateGraph report
1 parent 4848b1b commit ce23f73

File tree

1 file changed

+5
-5
lines changed
  • src/tools/rust-analyzer/crates/rust-analyzer/src

1 file changed

+5
-5
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -754,21 +754,21 @@ impl GlobalState {
754754
self.analysis_host.apply_change(change);
755755

756756
self.finish_loading_crate_graph();
757-
return;
757+
} else {
758+
change.set_crate_graph(crate_graph);
759+
self.fetch_proc_macros_queue.request_op(cause, (change, proc_macro_paths));
758760
}
759-
change.set_crate_graph(crate_graph);
760-
self.fetch_proc_macros_queue.request_op(cause, (change, proc_macro_paths));
761-
}
762761

763-
pub(crate) fn finish_loading_crate_graph(&mut self) {
764762
self.report_progress(
765763
"Building CrateGraph",
766764
crate::lsp::utils::Progress::End,
767765
None,
768766
None,
769767
None,
770768
);
769+
}
771770

771+
pub(crate) fn finish_loading_crate_graph(&mut self) {
772772
self.process_changes();
773773
self.reload_flycheck();
774774
}

0 commit comments

Comments
 (0)