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.
This commit is contained in:
bors 2022-05-20 13:10:49 +00:00
commit c73513f211

View File

@ -404,6 +404,7 @@ impl GlobalState {
Some(it) => it,
None => {
self.flycheck = Vec::new();
self.diagnostics.clear_check();
return;
}
};