mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 20:31:59 +00:00
feat: Add rust-analyzer.cargo.allTargets to configure passing --all-targets to cargo invocations
This commit is contained in:
parent
4b33850c39
commit
174af88e76
5 changed files with 31 additions and 9 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ impl Default for CargoFeatures {
|
|||
|
||||
#[derive(Default, Clone, Debug, PartialEq, Eq)]
|
||||
pub struct CargoConfig {
|
||||
/// Whether to pass `--all-targets` to cargo invocations.
|
||||
pub all_targets: bool,
|
||||
/// List of features to activate.
|
||||
pub features: CargoFeatures,
|
||||
/// rustc target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue