Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #18123 - jhgg:fix-ambigius-package-cargo-check, r=Veykril
fix: fix ambigious package name in flycheck fixes #18121
bors 2024-09-24
parent 7eb10bd · parent 99af938 · commit b4eff89
-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 e8d1a7e4df..49b1ba32a7 100644
--- a/crates/rust-analyzer/src/handlers/notification.rs
+++ b/crates/rust-analyzer/src/handlers/notification.rs
@@ -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)| {