Skip to content

Commit cf1ea9d

Browse files
bors[bot]lnicola
andauthored
Merge #10457
10457: internal: remove support for pre-1.47 sysroots r=lnicola a=lnicola This changed in 1.47 (about a year ago), so it should be pretty safe to remove. bors r+ Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 parents 9724ca7 + a683c08 commit cf1ea9d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

crates/project_model/src/sysroot.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ fn get_rustc_src(sysroot_path: &AbsPath) -> Option<ManifestPath> {
188188
}
189189

190190
fn get_rust_src(sysroot_path: &AbsPath) -> Option<AbsPathBuf> {
191-
// Try the new path first since the old one still exists.
192-
let rust_src = sysroot_path.join("lib/rustlib/src/rust");
193-
tracing::debug!(
194-
"Checking sysroot (looking for `library` and `src` dirs): {}",
195-
rust_src.display()
196-
);
197-
["library", "src"].iter().map(|it| rust_src.join(it)).find(|it| fs::metadata(it).is_ok())
191+
let rust_src = sysroot_path.join("lib/rustlib/src/rust/library");
192+
tracing::debug!("Checking sysroot: {}", rust_src.display());
193+
if fs::metadata(&rust_src).is_ok() {
194+
Some(rust_src)
195+
} else {
196+
None
197+
}
198198
}
199199

200200
const SYSROOT_CRATES: &str = "

0 commit comments

Comments
 (0)