Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #18858 from davidbarsky/davidbarsky/fix-18854
fix: clear diagnostics on cancel unconditionally
Chayim Refael Friedman 2025-01-07
parent bfb8127 · parent 140f91b · commit ccc7468
-rw-r--r--crates/rust-analyzer/src/flycheck.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/flycheck.rs b/crates/rust-analyzer/src/flycheck.rs
index bed49c7a6d..a306302cc0 100644
--- a/crates/rust-analyzer/src/flycheck.rs
+++ b/crates/rust-analyzer/src/flycheck.rs
@@ -419,9 +419,9 @@ impl FlycheckActor {
command_handle.cancel();
self.command_receiver.take();
self.report_progress(Progress::DidCancel);
- self.diagnostics_cleared_for.clear();
- self.diagnostics_received = false;
}
+ self.diagnostics_cleared_for.clear();
+ self.diagnostics_received = false;
}
/// Construct a `Command` object for checking the user's code. If the user