Closed
Description
Code
I tried this code:
src/lib.rs
:
#![feature(rustc_private)]
extern crate rustc_driver;
extern crate rustc_session;
#[rustversion::since(2024-11-03)]
use rustc_session::config::host_tuple as rustc_host;
#[rustversion::before(2024-11-03)]
use rustc_session::config::host_triple as rustc_host;
pub fn host() -> &'static str {
rustc_host()
}
tests/integration_test.rs
:
#[test]
fn test_target_tuple() {
assert_ne!(
testing_integration_rustc_private::host(),
"unknown-unknown-unknown"
);
}
I expected to see this happen: cargo +nightly test
succeeds.
Instead, this happened:
$ cargo +nightly test
Compiling testing-integration-rustc-private v0.1.0 (/Users/tamird/src/testing-integration-rustc-private)
error: cannot satisfy dependencies so `rustc_driver` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= note: `rustc_driver` was unavailable as a static crate, preventing fully static linking
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `core` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `compiler_builtins` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `rustc_std_workspace_core` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `alloc` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `libc` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `unwind` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `cfg_if` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `miniz_oxide` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `adler` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `hashbrown` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `rustc_std_workspace_alloc` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `std_detect` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `rustc_demangle` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `addr2line` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `gimli` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `object` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `memchr` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: cannot satisfy dependencies so `panic_unwind` only shows up once
|
= help: having upstream crates all available in one format will likely make this go away
= help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library
error: could not compile `testing-integration-rustc-private` (test "integration_test") due to 19 previous errors
Version it worked on
Using cargo-rustc-bisect
:
searched nightlies: from nightly-2024-08-05 to nightly-2024-12-27
regressed nightly: nightly-2024-08-12
searched commit range: https://github.com/rust-lang/rust/compare/730d5d4095a264ef5f7c0a0781eea68c15431d45...41dd149fd6a6a06795fc6b9f54cb49af2f61775f
regressed commit: https://github.com/rust-lang/rust/commit/9cb1998ea15e179482504e07cad8fa121e169a32