Skip to content

Commit d73b0d5

Browse files
committed
Don't filter flychecks by package member status
1 parent 25391e6 commit d73b0d5

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -745,25 +745,24 @@ impl GlobalState {
745745
let workspace_ids =
746746
this.workspaces.iter().enumerate().filter(|(_, ws)| match ws {
747747
project_model::ProjectWorkspace::Cargo { cargo, .. } => {
748-
cargo.packages().filter(|&pkg| cargo[pkg].is_member).any(
749-
|pkg| {
750-
cargo[pkg].targets.iter().any(|&it| {
751-
paths.contains(&cargo[it].root.as_path())
752-
})
753-
},
754-
)
748+
cargo.packages().any(|pkg| {
749+
cargo[pkg]
750+
.targets
751+
.iter()
752+
.any(|&it| paths.contains(&cargo[it].root.as_path()))
753+
})
755754
}
756755
project_model::ProjectWorkspace::Json { project, .. } => project
757756
.crates()
758757
.any(|(c, _)| crate_ids.iter().any(|&crate_id| crate_id == c)),
759758
project_model::ProjectWorkspace::DetachedFiles { .. } => false,
760759
});
761-
'workspace: for (id, _) in workspace_ids {
762-
for flycheck in &this.flycheck {
760+
for flycheck in &this.flycheck {
761+
for (id, _) in workspace_ids.clone() {
763762
if id == flycheck.id() {
764763
updated = true;
765764
flycheck.update();
766-
continue 'workspace;
765+
continue;
767766
}
768767
}
769768
}

0 commit comments

Comments
 (0)