aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/config.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 071fde64d..c135913e2 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -7,7 +7,7 @@
7//! configure the server itself, feature flags are passed into analysis, and 7//! configure the server itself, feature flags are passed into analysis, and
8//! tweak things like automatic insertion of `()` in completions. 8//! tweak things like automatic insertion of `()` in completions.
9 9
10use std::{convert::TryFrom, ffi::OsString, iter, path::PathBuf}; 10use std::{ffi::OsString, iter, path::PathBuf};
11 11
12use flycheck::FlycheckConfig; 12use flycheck::FlycheckConfig;
13use hir::PrefixKind; 13use hir::PrefixKind;
@@ -468,11 +468,7 @@ impl Config {
468 self.data.cargo_autoreload 468 self.data.cargo_autoreload
469 } 469 }
470 pub fn cargo(&self) -> CargoConfig { 470 pub fn cargo(&self) -> CargoConfig {
471 let rustc_source = self.data.rustcSource.clone().and_then(|it| { 471 let rustc_source = self.data.rustcSource.as_ref().map(|it| self.root_path.join(&it));
472 AbsPathBuf::try_from(it)
473 .map_err(|_| log::error!("rustc source directory must be an absolute path"))
474 .ok()
475 });
476 472
477 CargoConfig { 473 CargoConfig {
478 no_default_features: self.data.cargo_noDefaultFeatures, 474 no_default_features: self.data.cargo_noDefaultFeatures,