aboutsummaryrefslogtreecommitdiff
path: root/crates/flycheck
diff options
context:
space:
mode:
Diffstat (limited to 'crates/flycheck')
-rw-r--r--crates/flycheck/Cargo.toml2
-rw-r--r--crates/flycheck/src/lib.rs13
2 files changed, 11 insertions, 4 deletions
diff --git a/crates/flycheck/Cargo.toml b/crates/flycheck/Cargo.toml
index bea485694..ff8a1e568 100644
--- a/crates/flycheck/Cargo.toml
+++ b/crates/flycheck/Cargo.toml
@@ -11,7 +11,7 @@ doctest = false
11[dependencies] 11[dependencies]
12crossbeam-channel = "0.4.0" 12crossbeam-channel = "0.4.0"
13log = "0.4.8" 13log = "0.4.8"
14cargo_metadata = "0.10.0" 14cargo_metadata = "0.11.1"
15serde_json = "1.0.48" 15serde_json = "1.0.48"
16jod-thread = "0.1.1" 16jod-thread = "0.1.1"
17ra_toolchain = { path = "../ra_toolchain" } 17ra_toolchain = { path = "../ra_toolchain" }
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