Auto merge of #18123 - jhgg:fix-ambigius-package-cargo-check, r=Veykril

fix: fix ambigious package name in flycheck

fixes #18121
This commit is contained in:
bors 2024-09-24 10:03:41 +00:00
commit b4eff8971d

View file

@ -357,7 +357,7 @@ fn run_flycheck(state: &mut GlobalState, vfs_path: VfsPath) -> bool {
.targets
.iter()
.any(|&it| crate_root_paths.contains(&cargo[it].root.as_path()));
has_target_with_root.then(|| cargo[pkg].name.clone())
has_target_with_root.then(|| cargo.package_flag(&cargo[pkg]))
}),
project_model::ProjectWorkspaceKind::Json(project) => {
if !project.crates().any(|(_, krate)| {