Skip to content

Commit 201948a

Browse files
committed
fix: std Cargo.lock moved to library dir
rust-lang#14358 didn't check the correct Cargo.lock existence Perhaps it was there so the test passed, but after a new nightly is out it is gone. ``` Blocking waiting for file lock on package cache error: "/home/user/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/Cargo.lock" does not exist, unable to build with the standard library, try: rustup component add rust-src --toolchain nightly-aarch64-apple-darwin note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
1 parent f50c592 commit 201948a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cargo/core/compiler/standard_lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn resolve_std<'gctx>(
7373
}
7474

7575
let src_path = detect_sysroot_src_path(target_data)?;
76-
let std_ws_manifest_path = src_path.join("library").join("Cargo.toml");
76+
let std_ws_manifest_path = src_path.join("Cargo.toml");
7777
let gctx = ws.gctx();
7878
// TODO: Consider doing something to enforce --locked? Or to prevent the
7979
// lock file from being written, such as setting ephemeral.
@@ -192,7 +192,8 @@ fn detect_sysroot_src_path(target_data: &RustcTargetData<'_>) -> CargoResult<Pat
192192
.join("lib")
193193
.join("rustlib")
194194
.join("src")
195-
.join("rust");
195+
.join("rust")
196+
.join("library");
196197
let lock = src_path.join("Cargo.lock");
197198
if !lock.exists() {
198199
let msg = format!(

0 commit comments

Comments
 (0)