aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_flycheck/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_flycheck/src')
-rw-r--r--crates/ra_flycheck/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs
index 561657edb..68dcee285 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_toolchain::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
@@ -216,10 +215,10 @@ impl FlycheckThread {
216 215
217 let mut cmd = match &self.config { 216 let mut cmd = match &self.config {
218 FlycheckConfig::CargoCommand { command, all_targets, all_features, extra_args } => { 217 FlycheckConfig::CargoCommand { command, all_targets, all_features, extra_args } => {
219 let mut cmd = Command::new(get_path_for_executable("cargo").unwrap()); 218 let mut cmd = Command::new(ra_toolchain::cargo());
220 cmd.arg(command); 219 cmd.arg(command);
221 cmd.args(&["--workspace", "--message-format=json", "--manifest-path"]); 220 cmd.args(&["--workspace", "--message-format=json", "--manifest-path"])
222 cmd.arg(self.workspace_root.join("Cargo.toml")); 221 .arg(self.workspace_root.join("Cargo.toml"));
223 if *all_targets { 222 if *all_targets {
224 cmd.arg("--all-targets"); 223 cmd.arg("--all-targets");
225 } 224 }