mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
flycheck: Added checkOnSave.noDefaultFeatures
This commit adds the option `rust-analyzer.checkOnSave.noDefaultFeatures` and fixes #5550.
This commit is contained in:
parent
96c3ff1c57
commit
8d9f8ac273
3 changed files with 23 additions and 3 deletions
|
@ -24,6 +24,7 @@ pub enum FlycheckConfig {
|
|||
command: String,
|
||||
target_triple: Option<String>,
|
||||
all_targets: bool,
|
||||
no_default_features: bool,
|
||||
all_features: bool,
|
||||
features: Vec<String>,
|
||||
extra_args: Vec<String>,
|
||||
|
@ -180,6 +181,7 @@ impl FlycheckActor {
|
|||
FlycheckConfig::CargoCommand {
|
||||
command,
|
||||
target_triple,
|
||||
no_default_features,
|
||||
all_targets,
|
||||
all_features,
|
||||
extra_args,
|
||||
|
@ -198,9 +200,14 @@ impl FlycheckActor {
|
|||
}
|
||||
if *all_features {
|
||||
cmd.arg("--all-features");
|
||||
} else if !features.is_empty() {
|
||||
cmd.arg("--features");
|
||||
cmd.arg(features.join(" "));
|
||||
} else {
|
||||
if *no_default_features {
|
||||
cmd.arg("--no-default-features");
|
||||
}
|
||||
if !features.is_empty() {
|
||||
cmd.arg("--features");
|
||||
cmd.arg(features.join(" "));
|
||||
}
|
||||
}
|
||||
cmd.args(extra_args);
|
||||
cmd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue