mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 23:25:03 +00:00
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 <jonasschievink@gmail.com>
This commit is contained in:
commit
4402f2b280
1 changed files with 5 additions and 6 deletions
|
@ -68,8 +68,9 @@ impl Sysroot {
|
||||||
pub fn load(sysroot_src_dir: &AbsPath) -> Result<Sysroot> {
|
pub fn load(sysroot_src_dir: &AbsPath) -> Result<Sysroot> {
|
||||||
let mut sysroot = Sysroot { crates: Arena::default() };
|
let mut sysroot = Sysroot { crates: Arena::default() };
|
||||||
|
|
||||||
for name in SYSROOT_CRATES.trim().lines() {
|
for path in SYSROOT_CRATES.trim().lines() {
|
||||||
let root = [format!("{}/src/lib.rs", name), format!("lib{}/lib.rs", name)]
|
let name = path.split('/').last().unwrap();
|
||||||
|
let root = [format!("{}/src/lib.rs", path), format!("lib{}/lib.rs", path)]
|
||||||
.iter()
|
.iter()
|
||||||
.map(|it| sysroot_src_dir.join(it))
|
.map(|it| sysroot_src_dir.join(it))
|
||||||
.find(|it| it.exists());
|
.find(|it| it.exists());
|
||||||
|
@ -191,9 +192,8 @@ panic_abort
|
||||||
panic_unwind
|
panic_unwind
|
||||||
proc_macro
|
proc_macro
|
||||||
profiler_builtins
|
profiler_builtins
|
||||||
rtstartup
|
|
||||||
std
|
std
|
||||||
stdarch
|
stdarch/crates/std_detect
|
||||||
term
|
term
|
||||||
test
|
test
|
||||||
unwind";
|
unwind";
|
||||||
|
@ -204,9 +204,8 @@ core
|
||||||
panic_abort
|
panic_abort
|
||||||
panic_unwind
|
panic_unwind
|
||||||
profiler_builtins
|
profiler_builtins
|
||||||
rtstartup
|
|
||||||
proc_macro
|
proc_macro
|
||||||
stdarch
|
std_detect
|
||||||
term
|
term
|
||||||
test
|
test
|
||||||
unwind";
|
unwind";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue