aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_flycheck
diff options
context:
space:
mode:
authorguigui64 <[email protected]>2020-05-05 21:44:39 +0100
committerguigui64 <[email protected]>2020-05-05 21:46:42 +0100
commitc22660179c3f892a56ad5bacfddd4c2ec563d35e (patch)
tree00cbf8593507a297aca9338233f55e42d3f4bf92 /crates/ra_flycheck
parentd38741f681c173a96e991dc3c213d4c85dc5a8af (diff)
add the allFeatures flag (true by default)
Diffstat (limited to 'crates/ra_flycheck')
-rw-r--r--crates/ra_flycheck/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs
index b54a30ab8..f27252949 100644
--- a/crates/ra_flycheck/src/lib.rs
+++ b/crates/ra_flycheck/src/lib.rs
@@ -24,7 +24,7 @@ pub use crate::conv::url_from_path_with_drive_lowercasing;
24 24
25#[derive(Clone, Debug, PartialEq, Eq)] 25#[derive(Clone, Debug, PartialEq, Eq)]
26pub enum FlycheckConfig { 26pub enum FlycheckConfig {
27 CargoCommand { command: String, all_targets: bool, extra_args: Vec<String> }, 27 CargoCommand { command: String, all_targets: bool, all_features: bool, extra_args: Vec<String> },
28 CustomCommand { command: String, args: Vec<String> }, 28 CustomCommand { command: String, args: Vec<String> },
29} 29}
30 30
@@ -215,7 +215,7 @@ impl FlycheckThread {
215 self.check_process = None; 215 self.check_process = None;
216 216
217 let mut cmd = match &self.config { 217 let mut cmd = match &self.config {
218 FlycheckConfig::CargoCommand { command, all_targets, extra_args } => { 218 FlycheckConfig::CargoCommand { command, all_targets, all_features, extra_args } => {
219 let mut cmd = Command::new(cargo_binary()); 219 let mut cmd = Command::new(cargo_binary());
220 cmd.arg(command); 220 cmd.arg(command);
221 cmd.args(&["--workspace", "--message-format=json", "--manifest-path"]); 221 cmd.args(&["--workspace", "--message-format=json", "--manifest-path"]);
@@ -223,6 +223,9 @@ impl FlycheckThread {
223 if *all_targets { 223 if *all_targets {
224 cmd.arg("--all-targets"); 224 cmd.arg("--all-targets");
225 } 225 }
226 if *all_features {
227 cmd.arg("--all-features");
228 }
226 cmd.args(extra_args); 229 cmd.args(extra_args);
227 cmd 230 cmd
228 } 231 }