Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | crates/project-model/src/workspace.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/crates/project-model/src/workspace.rs b/crates/project-model/src/workspace.rs index 4d56668cf2..79bbbfb235 100644 --- a/crates/project-model/src/workspace.rs +++ b/crates/project-model/src/workspace.rs @@ -819,10 +819,16 @@ impl ProjectWorkspace { // [lib] // path = "../../src/lib.rs" // ``` + // + // or + // + // ```toml + // [[bin]] + // path = "../bin_folder/main.rs" + // ``` let extra_targets = cargo[pkg] .targets .iter() - .filter(|&&tgt| matches!(cargo[tgt].kind, TargetKind::Lib { .. })) .filter_map(|&tgt| cargo[tgt].root.parent()) .map(|tgt| tgt.normalize().to_path_buf()) .filter(|path| !path.starts_with(&pkg_root)); @@ -874,10 +880,16 @@ impl ProjectWorkspace { // [lib] // path = "../../src/lib.rs" // ``` + // + // or + // + // ```toml + // [[bin]] + // path = "../bin_folder/main.rs" + // ``` let extra_targets = cargo[pkg] .targets .iter() - .filter(|&&tgt| matches!(cargo[tgt].kind, TargetKind::Lib { .. })) .filter_map(|&tgt| cargo[tgt].root.parent()) .map(|tgt| tgt.normalize().to_path_buf()) .filter(|path| !path.starts_with(&pkg_root)); |