feat: Add rust-analyzer.cargo.allTargets to configure passing --all-targets to cargo invocations

This commit is contained in:
Alexis (Poliorcetics) Bourget 2024-03-21 18:56:52 +01:00
parent 4b33850c39
commit 174af88e76
No known key found for this signature in database
5 changed files with 31 additions and 9 deletions

View file

@ -86,7 +86,9 @@ impl WorkspaceBuildScripts {
// --all-targets includes tests, benches and examples in addition to the
// default lib and bins. This is an independent concept from the --target
// flag below.
cmd.arg("--all-targets");
if config.all_targets {
cmd.arg("--all-targets");
}
if let Some(target) = &config.target {
cmd.args(["--target", target]);