Skip to content

(Reproducible) Found unstable fingerprints for evaluate_obligation(fe6269799238ead4-76dd6f107d00ff42): Ok(EvaluatedToAmbig) #140793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
moxian opened this issue May 8, 2025 · 2 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@moxian
Copy link
Contributor

moxian commented May 8, 2025

Code

https://github.com/moxian/rust-mini-things/tree/unstable-eval-ambig

git clone https://github.com/moxian/rust-mini-things.git --branch unstable-eval-ambig
cd rust-mini-things/unstable-eval-ambig
git checkout 5efe9ae
cargo build # succeeds
git checkout 9e4910c
cargo build # ICE

Meta

rustc --version --verbose:

rustc 1.86.0 (05f9846f8 2025-03-31)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: x86_64-pc-windows-msvc
release: 1.86.0
LLVM version: 19.1.7

But also present on nightly (rustc 1.88.0-nightly (2e6882ac5 2025-05-05))
If compiling on stable, requires RUSTC_BOOTSTRAP=1 due to code shenanigans

Error output

error: internal compiler error: encountered incremental compilation error with evaluate_obligation(d26c3d7d51bae428-a81b738ddcca7476)
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p reqwest` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information


[backtrace here]

error[E0046]: not all trait items implemented, missing: `Error`, `Future`
  --> vendor\reqwest\src\dns\resolve.rs:48:1
   |
48 | impl Service<HyperName> for DynResolver {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Error`, `Future` in implementation
   |
   = help: implement the missing item: `type Error = /* Type */;`
   = help: implement the missing item: `type Future = /* Type */;`

For more information about this error, try `rustc --explain E0046`.
warning: `reqwest` (lib) generated 17 warnings
error: could not compile `reqwest` (lib) due to 2 previous errors; 17 warnings emitted
backtrace
thread 'rustc' panicked at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb\compiler\rustc_query_system\src\query\plumbing.rs:731:9:
Found unstable fingerprints for evaluate_obligation(fe6269799238ead4-76dd6f107d00ff42): Ok(EvaluatedToAmbig)
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library\std\src\panicking.rs:695
   1: core::panicking::panic_fmt
             at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library\core\src\panicking.rs:75
   2: rustc_query_system::query::plumbing::incremental_verify_ich_failed::<rustc_middle::ty::context::TyCtxt>
   3: RINvNtNtCs1bonBNpMvFl_18rustc_query_system5query8plumbing17try_execute_queryINtCs5uFTMav0Vyp_16rustc_query_impl13DynamicConfigINtNtCsdmqHcUI6doO_21rustc_data_structures9vec_cache8VecCacheNtNtCslRMtD7Kp4gh_10rustc_span6def_id8CrateNumINtNtNtCs2vqUEYxsi4E_12
   4: RINvNtNtCs1bonBNpMvFl_18rustc_query_system5query8plumbing17try_execute_queryINtCs5uFTMav0Vyp_16rustc_query_impl13DynamicConfigINtNtB4_6caches12DefaultCacheINtNtCs1KkNgFnBCUn_13rustc_type_ir9canonical19CanonicalQueryInputNtNtNtCs2vqUEYxsi4E_12rustc_middle2t
   5: rustc_query_impl::plumbing::query_key_hash_verify_all
   6: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
   7: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
   8: <rustc_trait_selection::traits::engine::ObligationCtxt<rustc_trait_selection::traits::FulfillmentError>>::assumed_wf_types_and_report_errors
   9: <alloc::raw_vec::RawVec<rustc_hir_typeck::method::probe::Candidate>>::grow_one
  10: rustc_hir_typeck::method::probe::method_autoderef_steps
  11: rustc_hir_typeck::method::probe::method_autoderef_steps
  12: rustc_hir_typeck::typeck
  13: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  14: <alloc::raw_vec::RawVec<rustc_hir_typeck::method::probe::Candidate>>::grow_one
  15: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  16: rustc_hir_typeck::typeck
  17: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  18: <alloc::raw_vec::RawVec<rustc_hir_typeck::method::probe::Candidate>>::grow_one
  19: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  20: rustc_hir_typeck::typeck
  21: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  22: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  23: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  24: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  25: rustc_hir_typeck::typeck
  26: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  27: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  28: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  29: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  30: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  31: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  32: rustc_hir_typeck::typeck
  33: rustc_hir_typeck::typeck
  34: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
  35: rustc_hir_typeck::typeck
  36: <rustc_hir_typeck::upvar::InferBorrowKind as rustc_hir_typeck::expr_use_visitor::Delegate>::borrow
  37: rustc_hir_typeck::typeck
  38: rustc_query_impl::plumbing::query_key_hash_verify_all
  39: RINvNtNtCs1bonBNpMvFl_18rustc_query_system5query8plumbing17try_execute_queryINtCs5uFTMav0Vyp_16rustc_query_impl13DynamicConfigINtNtCsdmqHcUI6doO_21rustc_data_structures9vec_cache8VecCacheNtNtCslRMtD7Kp4gh_10rustc_span6def_id10LocalDefIdINtNtNtCs2vqUEYxsi4E
  40: <alloc::sync::Arc<rustc_session::cstore::CrateSource>>::drop_slow
  41: <rustc_query_system::query::plumbing::JobOwner<()> as core::ops::drop::Drop>::drop
  42: RINvMs6_NtCs8UpmKsNDoY5_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs2vqUEYxsi4E_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCs1bonBNpMvFl_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  43: RINvMs6_NtCs8UpmKsNDoY5_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs2vqUEYxsi4E_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCs1bonBNpMvFl_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  44: RINvMs6_NtCs8UpmKsNDoY5_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs2vqUEYxsi4E_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCs1bonBNpMvFl_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  45: RINvMs6_NtCs8UpmKsNDoY5_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs2vqUEYxsi4E_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCs1bonBNpMvFl_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  46: RINvMs6_NtCs8UpmKsNDoY5_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs2vqUEYxsi4E_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCs1bonBNpMvFl_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  47: RINvNtNtCs1bonBNpMvFl_18rustc_query_system5query8plumbing15ensure_must_runINtCs5uFTMav0Vyp_16rustc_query_impl13DynamicConfigINtNtB4_6caches12DefaultCacheNtNtCslRMtD7Kp4gh_10rustc_span6def_id13LocalModDefIdINtNtNtCs2vqUEYxsi4E_12rustc_middle5query5erase6Era
  48: rustc_query_impl::query_system
  49: rustc_hir_analysis::check_crate
  50: <rustc_interface::passes::LintStoreExpandImpl as rustc_expand::base::LintStoreExpand>::pre_expansion_lint
  51: rustc_interface::passes::analysis
  52: <alloc::sync::Arc<rustc_session::cstore::CrateSource>>::drop_slow
  53: RINvNtNtCs1bonBNpMvFl_18rustc_query_system5query8plumbing17try_execute_queryINtCs5uFTMav0Vyp_16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCs2vqUEYxsi4E_12rustc_middle5query5erase6ErasedAhj0_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtx
  54: rustc_query_impl::query_system
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: please attach the file at `H:\work\my\trash\rust-mini\req\rustc-ice-2025-05-08T11_30_07-20116.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `dns::resolve::DynResolver: hyper_util::client::legacy::connect::dns::sealed::Resolve`
#1 [typeck] type-checking `connect::<impl at vendor\reqwest\src\connect.rs:199:1: 199:22>::connect_with_maybe_proxy`
#2 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 type_of_opaque(reqwest[4048]::connect::{impl#2}::connect_with_maybe_proxy::{opaque#0})
#1 type_of(reqwest[4048]::connect::{impl#2}::connect_with_maybe_proxy::{opaque#0})
#2 check_well_formed(reqwest[4048]::connect::{impl#2}::connect_with_maybe_proxy::{opaque#0})
#3 check_mod_type_wf(reqwest[4048]::connect)
end of try_mark_green dep node stack

Other issues with the same EvaluatedToAmbig: #127432 #127051 , although we probably can't know whether this one is an exact duplicate...

@rustbot label: +A-incr-comp

@moxian moxian added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels May 8, 2025
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. A-incr-comp Area: Incremental compilation labels May 8, 2025
@cyrgani
Copy link
Contributor

cyrgani commented May 8, 2025

working on a reduction

@cyrgani
Copy link
Contributor

cyrgani commented May 8, 2025

reduction with renaming: cargo clean && cargo rustc -- --cfg=a && cargo rustc

struct Foo;

trait First {
    type Assoc;
}

trait Second {
    type Assoc;
}

trait Final {
    fn call();
}

impl First for Foo {
    #[cfg(not(a))]
    type Assoc = ();
}

impl<T> Second for T
where
    T: First,
    T::Assoc: Into<Box<()>>,
{
    type Assoc = ();
}

impl<T> Final for T
where
    T: Second,
    T::Assoc: Clone,
{
    fn call() {}
}

fn main() {
    Foo::call();
}

@rustbot label S-has-mcve

@rustbot rustbot added the S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants