rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.8k stars 2.42k forks source link

Cargo panics when `forced-target` is specified to be `i686-pc-windows-msvc` #14833

Open amnestria opened 2 hours ago

amnestria commented 2 hours ago

Problem

When attempting to compile a crate that has i686-pc-windows-msvc forced as its target, Cargo panics:

thread 'main' panicked at src/cargo\core\resolver\features.rs:323:14:
activated_features for invalid package: features did not find PackageId { name: "windows_i686_msvc", version: "0.52.6", source: "registry `crates-io`" } NormalOrDev
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps

  1. Enable the experimental Cargo feature per-package-target inside Cargo.toml.
  2. Specify package.forced-target to be i686-pc-windows-msvc.
  3. Compile.

Possible Solution(s)

No response

Notes

No response

Version

release: 1.83.0-nightly
commit-hash: ad074abe3a18ce8444c06f962ceecfd056acfc73
commit-date: 2024-10-04
host: x86_64-pc-windows-msvc
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:Schannel)
os: Windows 10.0.19044 (Windows 10 IoT Enterprise LTSC 2021) [64-bit]
weihanglo commented 2 hours ago

Thanks for the bug report. Mind sharing your Cargo.toml, or any minimal reproducible example? A plain Cargo.toml with the steps you described in cargo 1.84.0-nightly (4a2d8dc63 2024-11-09) doesn't panic.