aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r--crates/ra_project_model/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index 6da4d7928..8053712ff 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -15,6 +15,7 @@ use paths::{AbsPath, AbsPathBuf};
15use ra_cfg::CfgOptions; 15use ra_cfg::CfgOptions;
16use ra_db::{CrateGraph, CrateId, CrateName, Edition, Env, FileId}; 16use ra_db::{CrateGraph, CrateId, CrateName, Edition, Env, FileId};
17use rustc_hash::{FxHashMap, FxHashSet}; 17use rustc_hash::{FxHashMap, FxHashSet};
18use stdx::split_delim;
18 19
19pub use crate::{ 20pub use crate::{
20 cargo_workspace::{CargoConfig, CargoWorkspace, Package, Target, TargetKind}, 21 cargo_workspace::{CargoConfig, CargoWorkspace, Package, Target, TargetKind},
@@ -529,11 +530,10 @@ fn get_rustc_cfg_options(target: Option<&str>) -> CfgOptions {
529 match rustc_cfgs { 530 match rustc_cfgs {
530 Ok(rustc_cfgs) => { 531 Ok(rustc_cfgs) => {
531 for line in rustc_cfgs.lines() { 532 for line in rustc_cfgs.lines() {
532 match line.find('=') { 533 match split_delim(line, '=') {
533 None => cfg_options.insert_atom(line.into()), 534 None => cfg_options.insert_atom(line.into()),
534 Some(pos) => { 535 Some((key, value)) => {
535 let key = &line[..pos]; 536 let value = value.trim_matches('"');
536 let value = line[pos + 1..].trim_matches('"');
537 cfg_options.insert_key_value(key.into(), value.into()); 537 cfg_options.insert_key_value(key.into(), value.into());
538 } 538 }
539 } 539 }