diff options
Diffstat (limited to 'crates/ra_flycheck')
-rw-r--r-- | crates/ra_flycheck/Cargo.toml | 3 | ||||
-rw-r--r-- | crates/ra_flycheck/src/lib.rs | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_flycheck/Cargo.toml b/crates/ra_flycheck/Cargo.toml index 324c33d9d..3d5093264 100644 --- a/crates/ra_flycheck/Cargo.toml +++ b/crates/ra_flycheck/Cargo.toml | |||
@@ -4,6 +4,9 @@ name = "ra_flycheck" | |||
4 | version = "0.1.0" | 4 | version = "0.1.0" |
5 | authors = ["rust-analyzer developers"] | 5 | authors = ["rust-analyzer developers"] |
6 | 6 | ||
7 | [lib] | ||
8 | doctest = false | ||
9 | |||
7 | [dependencies] | 10 | [dependencies] |
8 | crossbeam-channel = "0.4.0" | 11 | crossbeam-channel = "0.4.0" |
9 | lsp-types = { version = "0.74.0", features = ["proposed"] } | 12 | lsp-types = { version = "0.74.0", features = ["proposed"] } |
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)] |
26 | pub enum FlycheckConfig { | 26 | pub 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 | } |