Skip to content

Commit facaf8b

Browse files
authored
Merge pull request #19384 from Veykril/push-yppplzzpoymr
fix: Fix stale `Building CrateGraph` report
2 parents 1c72e54 + c159ac2 commit facaf8b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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)