You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a new binary project, removing the content of main.rs, adding [unstable] build-std = ["core"] to .cargo/config.toml, and running cargo build --target x86_64-pc-windows-msvc on my Windows x64 machine returns the following error:
error: failed to select a version for the requirement `libc = "^0.2"`
candidate versions found which didn't match: 0.2.100, 0.2.99, 0.2.98, ...
location searched: crates.io index
required by package `test v0.0.0 (%UserProfile%\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\test)`
I checked the contents of %UserProfile%\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\test\Cargo.toml, it has the following dependency line: libc = { version = "0.2", default-features = false }.
Thanks for the report! This as also reported at rust-lang/cargo#9976, and we have identified the cause and have a fix in the works.
As a workaround, I would recommend deleting your registry cache which is located at $CARGO_HOME/registry/index. An alternate workaround is to use a nightly before nightly-2021-10-14.
Creating a new binary project, removing the content of
main.rs
, adding[unstable] build-std = ["core"]
to.cargo/config.toml
, and runningcargo build --target x86_64-pc-windows-msvc
on my Windows x64 machine returns the following error:I checked the contents of
%UserProfile%\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\test\Cargo.toml
, it has the following dependency line:libc = { version = "0.2", default-features = false }
.Rust version:
rustc 1.58.0-nightly (1f12ac872 2021-10-17)
The text was updated successfully, but these errors were encountered: