diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-08 13:55:55 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-08 13:55:55 +0100 |
commit | 51e4b92c1eee25cb6bf1b5ec8e7633dfc5f67a45 (patch) | |
tree | 871ebe102579fd2c8a35d2d5df4ed18b27219fd6 /crates/ra_flycheck | |
parent | 8295a9340c1fbda805497035054ead0b10c0d88e (diff) | |
parent | ecff5dc141046c5b9e40639657247a05fb9b0344 (diff) |
Merge #4375
4375: Cleanup toolchain handling r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_flycheck')
-rw-r--r-- | crates/ra_flycheck/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_flycheck/src/lib.rs | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_flycheck/Cargo.toml b/crates/ra_flycheck/Cargo.toml index d0f7fb2dc..03e557148 100644 --- a/crates/ra_flycheck/Cargo.toml +++ b/crates/ra_flycheck/Cargo.toml | |||
@@ -14,7 +14,7 @@ log = "0.4.8" | |||
14 | cargo_metadata = "0.9.1" | 14 | cargo_metadata = "0.9.1" |
15 | serde_json = "1.0.48" | 15 | serde_json = "1.0.48" |
16 | jod-thread = "0.1.1" | 16 | jod-thread = "0.1.1" |
17 | ra_env = { path = "../ra_env" } | 17 | ra_toolchain = { path = "../ra_toolchain" } |
18 | 18 | ||
19 | [dev-dependencies] | 19 | [dev-dependencies] |
20 | insta = "0.16.0" | 20 | insta = "0.16.0" |
diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs index d8b727b0e..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 | }; |
19 | use ra_env::get_path_for_executable; | ||
20 | 19 | ||
21 | use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic}; | 20 | use 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 | } |