Skip to content

fix: Update sysroot crates #9357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions crates/project_model/src/sysroot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ impl Sysroot {
pub fn load(sysroot_src_dir: &AbsPath) -> Result<Sysroot> {
let mut sysroot = Sysroot { crates: Arena::default() };

for name in SYSROOT_CRATES.trim().lines() {
let root = [format!("{}/src/lib.rs", name), format!("lib{}/lib.rs", name)]
for path in SYSROOT_CRATES.trim().lines() {
let name = path.split('/').last().unwrap();
let root = [format!("{}/src/lib.rs", path), format!("lib{}/lib.rs", path)]
.iter()
.map(|it| sysroot_src_dir.join(it))
.find(|it| it.exists());
Expand Down Expand Up @@ -191,9 +192,8 @@ panic_abort
panic_unwind
proc_macro
profiler_builtins
rtstartup
std
stdarch
stdarch/crates/std_detect
term
test
unwind";
Expand All @@ -204,9 +204,8 @@ core
panic_abort
panic_unwind
profiler_builtins
rtstartup
proc_macro
stdarch
std_detect
term
test
unwind";