Skip to content

Commit 140f91b

Browse files
committed
fix: clear diagnostics on cancel unconditionally, fixing #18854
1 parent bfb8127 commit 140f91b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/rust-analyzer/src/flycheck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,9 @@ impl FlycheckActor {
419419
command_handle.cancel();
420420
self.command_receiver.take();
421421
self.report_progress(Progress::DidCancel);
422-
self.diagnostics_cleared_for.clear();
423-
self.diagnostics_received = false;
424422
}
423+
self.diagnostics_cleared_for.clear();
424+
self.diagnostics_received = false;
425425
}
426426

427427
/// Construct a `Command` object for checking the user's code. If the user

0 commit comments

Comments
 (0)