Unnamed repository; edit this file 'description' to name the repository.
minor: Require both the existence of a target and check_workspace to be false to restart package-wide flycheck
Ali Bektas 2024-09-27
parent 2f55a91 · commit aeed8f8
-rw-r--r--crates/rust-analyzer/src/handlers/notification.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/handlers/notification.rs b/crates/rust-analyzer/src/handlers/notification.rs
index 49b1ba32a7..bb03eb3c89 100644
--- a/crates/rust-analyzer/src/handlers/notification.rs
+++ b/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)),