diff options
author | Dmitry <[email protected]> | 2020-08-09 14:35:51 +0100 |
---|---|---|
committer | Dmitry <[email protected]> | 2020-08-09 14:39:32 +0100 |
commit | 8068302fefc75440b823f4bf1731a5f347d7c767 (patch) | |
tree | 251b967182e79bc82a58c2fb208c688f6152df1f /crates/flycheck/src/lib.rs | |
parent | 1a43a0f63e0008787225abb6fb2baef97b6a39e0 (diff) | |
parent | 8a57afe5a4bfab40072a83f7dc4ca560bf860919 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'crates/flycheck/src/lib.rs')
-rw-r--r-- | crates/flycheck/src/lib.rs | 13 |
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 |