From a971238175b4e9075adaa6c5889a65ba5f9233b2 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 19 Aug 2025 11:15:00 -0700 Subject: [PATCH 1/2] `std_detect`: Use `rustc-std-workspace-*` to pull in `compiler-builtins` https://github.com/rust-lang/rust/pull/145489 changed `std_detect` to no longer depend on `cfg-if`, which meant it no longer indirectly pulled in `rustc-std-workspace-core` via `cfg-if`. That caused it to no longer depend on `compiler-builtins`. Change `std_detect` to use `rustc-std-workspace-core` and `rustc-std-workspace-alloc`, to integrate with the rustc workspace. This also pulls in `compiler-builtins` via `rustc-std-workspace-core`. Closes: https://github.com/rust-lang/rust/issues/145594 --- library/std_detect/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std_detect/Cargo.toml b/library/std_detect/Cargo.toml index 33e6617c38147..2739bb5923009 100644 --- a/library/std_detect/Cargo.toml +++ b/library/std_detect/Cargo.toml @@ -21,8 +21,8 @@ is-it-maintained-open-issues = { repository = "rust-lang/stdarch" } maintenance = { status = "experimental" } [dependencies] -core = { path = "../core" } -alloc = { path = "../alloc" } +core = { version = "1.0.0", package = 'rustc-std-workspace-core' } +alloc = { version = "1.0.0", package = 'rustc-std-workspace-alloc' } [target.'cfg(not(windows))'.dependencies] libc = { version = "0.2.0", optional = true, default-features = false } From 4c948bc3324002aa9519a0fe20d67f951dd6ae25 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 19 Aug 2025 11:46:37 -0700 Subject: [PATCH 2/2] Update lockfile for changes to `std_detect` --- library/Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Cargo.lock b/library/Cargo.lock index 656576d2d8e56..418a5f78397c6 100644 --- a/library/Cargo.lock +++ b/library/Cargo.lock @@ -336,9 +336,9 @@ dependencies = [ name = "std_detect" version = "0.1.5" dependencies = [ - "alloc", - "core", "libc", + "rustc-std-workspace-alloc", + "rustc-std-workspace-core", ] [[package]]