aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_flycheck
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_flycheck')
-rw-r--r--crates/ra_flycheck/Cargo.toml2
-rw-r--r--crates/ra_flycheck/src/lib.rs7
2 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_flycheck/Cargo.toml b/crates/ra_flycheck/Cargo.toml
index 578a45894..eac502da5 100644
--- a/crates/ra_flycheck/Cargo.toml
+++ b/crates/ra_flycheck/Cargo.toml
@@ -14,7 +14,7 @@ log = "0.4.8"
14cargo_metadata = "0.10.0" 14cargo_metadata = "0.10.0"
15serde_json = "1.0.48" 15serde_json = "1.0.48"
16jod-thread = "0.1.1" 16jod-thread = "0.1.1"
17ra_env = { path = "../ra_env" } 17ra_toolchain = { path = "../ra_toolchain" }
18 18
19[dev-dependencies] 19[dev-dependencies]
20insta = "0.16.0" 20insta = "0.16.0"
diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs
index 39b02ca94..24af75c95 100644
--- a/crates/ra_flycheck/src/lib.rs
+++ b/crates/ra_flycheck/src/lib.rs
@@ -16,7 +16,6 @@ use lsp_types::{
16 CodeAction, CodeActionOrCommand, Diagnostic, Url, WorkDoneProgress, WorkDoneProgressBegin, 16 CodeAction, CodeActionOrCommand, Diagnostic, Url, WorkDoneProgress, WorkDoneProgressBegin,
17 WorkDoneProgressEnd, WorkDoneProgressReport, 17 WorkDoneProgressEnd, WorkDoneProgressReport,
18}; 18};
19use ra_env::get_path_for_executable;
20 19
21use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic}; 20use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic};
22 21
@@ -218,10 +217,10 @@ impl FlycheckThread {
218 217
219 let mut cmd = match &self.config { 218 let mut cmd = match &self.config {
220 FlycheckConfig::CargoCommand { command, all_targets, all_features, extra_args } => { 219 FlycheckConfig::CargoCommand { command, all_targets, all_features, extra_args } => {
221 let mut cmd = Command::new(get_path_for_executable("cargo").unwrap()); 220 let mut cmd = Command::new(ra_toolchain::cargo());
222 cmd.arg(command); 221 cmd.arg(command);
223 cmd.args(&["--workspace", "--message-format=json", "--manifest-path"]); 222 cmd.args(&["--workspace", "--message-format=json", "--manifest-path"])
224 cmd.arg(self.workspace_root.join("Cargo.toml")); 223 .arg(self.workspace_root.join("Cargo.toml"));
225 if *all_targets { 224 if *all_targets {
226 cmd.arg("--all-targets"); 225 cmd.arg("--all-targets");
227 } 226 }