From 4866fb457a396669fc2d96a8cf5938f4cce5e162 Mon Sep 17 00:00:00 2001 From: Ali Bektas Date: Tue, 26 Nov 2024 18:37:39 +0100 Subject: [PATCH] Revert #18197 Our first attempt to make flycheck only check the current crate if the crate is one of bin/bench/test targets had caused `check_workspace` to be ignored, which should have been a config with higher precedence all along. This commit revert #18197 and closes #18562 --- .../crates/rust-analyzer/src/handlers/notification.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs index bb03eb3c89b0..49b1ba32a795 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs @@ -380,7 +380,7 @@ fn run_flycheck(state: &mut GlobalState, vfs_path: VfsPath) -> bool { if id == flycheck.id() { updated = true; match package.filter(|_| { - !world.config.flycheck_workspace(source_root_id) && target.is_some() + !world.config.flycheck_workspace(source_root_id) || target.is_some() }) { Some(package) => flycheck .restart_for_package(package, target.clone().map(TupleExt::head)),