aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model/src')
-rw-r--r--crates/ra_project_model/src/cfg_flag.rs4
-rw-r--r--crates/ra_project_model/src/sysroot.rs48
2 files changed, 19 insertions, 33 deletions
diff --git a/crates/ra_project_model/src/cfg_flag.rs b/crates/ra_project_model/src/cfg_flag.rs
index 1bc5d4832..bd50056c6 100644
--- a/crates/ra_project_model/src/cfg_flag.rs
+++ b/crates/ra_project_model/src/cfg_flag.rs
@@ -4,7 +4,7 @@
4use std::str::FromStr; 4use std::str::FromStr;
5 5
6use ra_cfg::CfgOptions; 6use ra_cfg::CfgOptions;
7use stdx::split_delim; 7use stdx::split_once;
8 8
9#[derive(Clone, Eq, PartialEq, Debug)] 9#[derive(Clone, Eq, PartialEq, Debug)]
10pub enum CfgFlag { 10pub enum CfgFlag {
@@ -15,7 +15,7 @@ pub enum CfgFlag {
15impl FromStr for CfgFlag { 15impl FromStr for CfgFlag {
16 type Err = String; 16 type Err = String;
17 fn from_str(s: &str) -> Result<Self, Self::Err> { 17 fn from_str(s: &str) -> Result<Self, Self::Err> {
18 let res = match split_delim(s, '=') { 18 let res = match split_once(s, '=') {
19 Some((key, value)) => { 19 Some((key, value)) => {
20 if !(value.starts_with('"') && value.ends_with('"')) { 20 if !(value.starts_with('"') && value.ends_with('"')) {
21 return Err(format!("Invalid cfg ({:?}), value should be in quotes", s)); 21 return Err(format!("Invalid cfg ({:?}), value should be in quotes", s));
diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs
index 9e23b5805..a10ade375 100644
--- a/crates/ra_project_model/src/sysroot.rs
+++ b/crates/ra_project_model/src/sysroot.rs
@@ -146,42 +146,28 @@ impl SysrootCrateData {
146} 146}
147 147
148const SYSROOT_CRATES: &str = " 148const SYSROOT_CRATES: &str = "
149std
150core
151alloc 149alloc
152collections 150core
153libc
154proc_macro
155rustc_unicode
156std_unicode
157test
158alloc_jemalloc
159alloc_system
160compiler_builtins
161getopts
162panic_unwind
163panic_abort 151panic_abort
164rand 152panic_unwind
153proc_macro
154profiler_builtins
155rtstartup
156std
157stdarch
165term 158term
166unwind 159test
167build_helper 160unwind";
168rustc_asan
169rustc_lsan
170rustc_msan
171rustc_tsan
172syntax";
173 161
174const STD_DEPS: &str = " 162const STD_DEPS: &str = "
175alloc 163alloc
176alloc_jemalloc
177alloc_system
178core 164core
179panic_abort 165panic_abort
180rand 166panic_unwind
181compiler_builtins 167profiler_builtins
182unwind 168rtstartup
183rustc_asan 169proc_macro
184rustc_lsan 170stdarch
185rustc_msan 171term
186rustc_tsan 172test
187build_helper"; 173unwind";