Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #12325 - jonas-schievink:clear-check-diags, r=jonas-schievink
fix: Clear `cargo check` diagnostics when flycheck is turned off Previously stale diagnostics were left over indefinitely when turning off "Check on Save" while diagnostics are present.
bors 2022-05-20
parent 7f226fc · parent 3e356c1 · commit c73513f
-rw-r--r--crates/rust-analyzer/src/reload.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index ed8c24acd1..c1f7e477f1 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -404,6 +404,7 @@ impl GlobalState {
Some(it) => it,
None => {
self.flycheck = Vec::new();
+ self.diagnostics.clear_check();
return;
}
};