rust-lang / rust-lang/rust

[ICE]: Found unstable fingerprints for evaluate_obligation

Open
#154,857 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-incr-comp C-bug fixed-by-next-solver I-ICE needs-triage S-has-mcve T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

rustc-ice-2026-04-05T19_13_50-219556.txt

I hit this bug when working with the tower library. I was writing tests that called services, where the services were ServiceFns, which implement the Service trait using an async closure. I moved calls to .ready().await?.call().await? into a helper function, which triggered the ICE during the incremental compilation.

This is as far as I've been able to minimize it:

Code
use std::{
    pin::Pin,
    task::{Context, Poll},
};

trait MyTrait {}

struct Wrapper<T>(T);

impl<F, T: Fn() -> F> MyTrait for T {}

impl<T: MyTrait> Future for Wrapper<T> {
    type Output = ();

    fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Self::Output> {
        Poll::Ready(())
    }
}

fn foo<T: MyTrait>(_: T) {}

fn main() {
    let obj = async || {};
    foo(obj);
    // adding/removing this after first build causes ICE
    async { Wrapper(obj).await };
}
Meta

rustc --version --verbose:

rustc 1.96.0-nightly (fb27476aa 2026-03-28)
binary: rustc
commit-hash: fb27476aaf1012f1f6ace6306f9b990e0d989c31
commit-date: 2026-03-28
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.2

I also tested this on the latest stable, which also has the bug.

Error output
thread 'rustc' (215962) panicked at /rustc-dev/fb27476aaf1012f1f6ace6306f9b990e0d989c31/compiler/rustc_middle/src/verify_ich.rs:80:9:
Found unstable fingerprints for evaluate_obligation(d10b6c7c46031ea5-69cd772e0bff9012): Ok(EvaluatedToOk)
Backtrace

   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: rustc_middle::verify_ich::incremental_verify_ich_failed
   3: rustc_middle::verify_ich::incremental_verify_ich::<rustc_middle::query::erase::ErasedData<[u8; 2]>>
   4: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_type_ir::canonical::CanonicalQueryInput<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::predicate::Predicate>>, rustc_middle::query::erase::ErasedData<[u8; 2]>>, true>
   5: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
   6: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
   7: <rustc_trait_selection::traits::engine::ObligationCtxt>::make_canonicalized_query_response::<()>
   8: rustc_traits::type_op::type_op_prove_predicate
   9: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_type_ir::canonical::CanonicalQueryInput<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::traits::query::type_op::ProvePredicate>>, rustc_middle::query::erase::ErasedData<[u8; 8]>>, true>
  10: <rustc_borrowck::type_check::TypeChecker>::normalize_and_prove_instantiated_predicates
  11: <rustc_borrowck::type_check::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_operand
  12: <rustc_borrowck::type_check::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_body
  13: rustc_borrowck::type_check::type_check
  14: <rustc_borrowck::root_cx::BorrowCheckRootCtxt>::do_mir_borrowck
  15: rustc_borrowck::mir_borrowck
      [... omitted 1 frame ...]
  16: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}
  17: rustc_interface::passes::analysis
  18: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, true>
  19: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the minimized example with incremental compilation, then inspect the panic at compiler/rustc_middle/src/verify_ich.rs:80 and trace the reported path through rustc_trait_selection and rustc_borrowck. Done means adding or removing the async expression after the first build no longer triggers the unstable fingerprint ICE.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.