From 3e356c1fd30599f5bda7aaa01a3338945f9045ba Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 20 May 2022 15:07:55 +0200 Subject: [PATCH] Clear `cargo check` diagnostics when flycheck is turned off --- crates/rust-analyzer/src/reload.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index ed8c24acd1c..c1f7e477f15 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -404,6 +404,7 @@ fn reload_flycheck(&mut self) { Some(it) => it, None => { self.flycheck = Vec::new(); + self.diagnostics.clear_check(); return; } };