aboutsummaryrefslogtreecommitdiff
path: root/crates/flycheck
diff options
context:
space:
mode:
Diffstat (limited to 'crates/flycheck')
-rw-r--r--crates/flycheck/src/lib.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs
index ad376ad18..7c38f5ef9 100644
--- a/crates/flycheck/src/lib.rs
+++ b/crates/flycheck/src/lib.rs
@@ -24,6 +24,7 @@ pub enum FlycheckConfig {
24 command: String, 24 command: String,
25 target_triple: Option<String>, 25 target_triple: Option<String>,
26 all_targets: bool, 26 all_targets: bool,
27 no_default_features: bool,
27 all_features: bool, 28 all_features: bool,
28 features: Vec<String>, 29 features: Vec<String>,
29 extra_args: Vec<String>, 30 extra_args: Vec<String>,
@@ -180,6 +181,7 @@ impl FlycheckActor {
180 FlycheckConfig::CargoCommand { 181 FlycheckConfig::CargoCommand {
181 command, 182 command,
182 target_triple, 183 target_triple,
184 no_default_features,
183 all_targets, 185 all_targets,
184 all_features, 186 all_features,
185 extra_args, 187 extra_args,
@@ -198,9 +200,14 @@ impl FlycheckActor {
198 } 200 }
199 if *all_features { 201 if *all_features {
200 cmd.arg("--all-features"); 202 cmd.arg("--all-features");
201 } else if !features.is_empty() { 203 } else {
202 cmd.arg("--features"); 204 if *no_default_features {
203 cmd.arg(features.join(" ")); 205 cmd.arg("--no-default-features");
206 }
207 if !features.is_empty() {
208 cmd.arg("--features");
209 cmd.arg(features.join(" "));
210 }
204 } 211 }
205 cmd.args(extra_args); 212 cmd.args(extra_args);
206 cmd 213 cmd