diff options
Diffstat (limited to 'crates/ra_project_model/src')
-rw-r--r-- | crates/ra_project_model/src/cfg_flag.rs | 4 | ||||
-rw-r--r-- | crates/ra_project_model/src/sysroot.rs | 48 |
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 @@ | |||
4 | use std::str::FromStr; | 4 | use std::str::FromStr; |
5 | 5 | ||
6 | use ra_cfg::CfgOptions; | 6 | use ra_cfg::CfgOptions; |
7 | use stdx::split_delim; | 7 | use stdx::split_once; |
8 | 8 | ||
9 | #[derive(Clone, Eq, PartialEq, Debug)] | 9 | #[derive(Clone, Eq, PartialEq, Debug)] |
10 | pub enum CfgFlag { | 10 | pub enum CfgFlag { |
@@ -15,7 +15,7 @@ pub enum CfgFlag { | |||
15 | impl FromStr for CfgFlag { | 15 | impl 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 | ||
148 | const SYSROOT_CRATES: &str = " | 148 | const SYSROOT_CRATES: &str = " |
149 | std | ||
150 | core | ||
151 | alloc | 149 | alloc |
152 | collections | 150 | core |
153 | libc | ||
154 | proc_macro | ||
155 | rustc_unicode | ||
156 | std_unicode | ||
157 | test | ||
158 | alloc_jemalloc | ||
159 | alloc_system | ||
160 | compiler_builtins | ||
161 | getopts | ||
162 | panic_unwind | ||
163 | panic_abort | 151 | panic_abort |
164 | rand | 152 | panic_unwind |
153 | proc_macro | ||
154 | profiler_builtins | ||
155 | rtstartup | ||
156 | std | ||
157 | stdarch | ||
165 | term | 158 | term |
166 | unwind | 159 | test |
167 | build_helper | 160 | unwind"; |
168 | rustc_asan | ||
169 | rustc_lsan | ||
170 | rustc_msan | ||
171 | rustc_tsan | ||
172 | syntax"; | ||
173 | 161 | ||
174 | const STD_DEPS: &str = " | 162 | const STD_DEPS: &str = " |
175 | alloc | 163 | alloc |
176 | alloc_jemalloc | ||
177 | alloc_system | ||
178 | core | 164 | core |
179 | panic_abort | 165 | panic_abort |
180 | rand | 166 | panic_unwind |
181 | compiler_builtins | 167 | profiler_builtins |
182 | unwind | 168 | rtstartup |
183 | rustc_asan | 169 | proc_macro |
184 | rustc_lsan | 170 | stdarch |
185 | rustc_msan | 171 | term |
186 | rustc_tsan | 172 | test |
187 | build_helper"; | 173 | unwind"; |