diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-21 14:27:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-21 14:27:57 +0100 |
commit | 4402f2b280f58896ed0696f4243d88a58fd970ca (patch) | |
tree | 0e19efe4d0264aa2738db564424a95a6cbfca50b | |
parent | c69f762f2673e9b671d91d7b8b110d8481f4ed07 (diff) | |
parent | 9e306909dbb594ba013142f3600908889bd98976 (diff) |
Merge #9357
9357: fix: Update sysroot crates r=jonas-schievink a=jonas-schievink
Removes `rtstartup`, since that's not a Cargo crate (its files are compiled into object files and linked alongside the stdlib).
Adds `std_detect`.
Part of https://github.com/rust-analyzer/rust-analyzer/issues/9352 (doesn't fix it since std_detect is full of `cfg_if!`)
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
-rw-r--r-- | crates/project_model/src/sysroot.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/project_model/src/sysroot.rs b/crates/project_model/src/sysroot.rs index a22f79c15..006263da8 100644 --- a/crates/project_model/src/sysroot.rs +++ b/crates/project_model/src/sysroot.rs | |||
@@ -68,8 +68,9 @@ impl Sysroot { | |||
68 | pub fn load(sysroot_src_dir: &AbsPath) -> Result<Sysroot> { | 68 | pub fn load(sysroot_src_dir: &AbsPath) -> Result<Sysroot> { |
69 | let mut sysroot = Sysroot { crates: Arena::default() }; | 69 | let mut sysroot = Sysroot { crates: Arena::default() }; |
70 | 70 | ||
71 | for name in SYSROOT_CRATES.trim().lines() { | 71 | for path in SYSROOT_CRATES.trim().lines() { |
72 | let root = [format!("{}/src/lib.rs", name), format!("lib{}/lib.rs", name)] | 72 | let name = path.split('/').last().unwrap(); |
73 | let root = [format!("{}/src/lib.rs", path), format!("lib{}/lib.rs", path)] | ||
73 | .iter() | 74 | .iter() |
74 | .map(|it| sysroot_src_dir.join(it)) | 75 | .map(|it| sysroot_src_dir.join(it)) |
75 | .find(|it| it.exists()); | 76 | .find(|it| it.exists()); |
@@ -191,9 +192,8 @@ panic_abort | |||
191 | panic_unwind | 192 | panic_unwind |
192 | proc_macro | 193 | proc_macro |
193 | profiler_builtins | 194 | profiler_builtins |
194 | rtstartup | ||
195 | std | 195 | std |
196 | stdarch | 196 | stdarch/crates/std_detect |
197 | term | 197 | term |
198 | test | 198 | test |
199 | unwind"; | 199 | unwind"; |
@@ -204,9 +204,8 @@ core | |||
204 | panic_abort | 204 | panic_abort |
205 | panic_unwind | 205 | panic_unwind |
206 | profiler_builtins | 206 | profiler_builtins |
207 | rtstartup | ||
208 | proc_macro | 207 | proc_macro |
209 | stdarch | 208 | std_detect |
210 | term | 209 | term |
211 | test | 210 | test |
212 | unwind"; | 211 | unwind"; |