rust-lang / rust-lang/rust-clippy

incremental compilation error when using higher-ranked-assumptions

Open
#16,181 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug I-ICE
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Summary

The bug has probably something to do with a function in my website rewrite that requires higher-ranked-assumptions. I don't understand that rust feature well enough to create a minimal example but my codebase is relatively small.

It does not happen when using cargo check, only with cargo clippy. (Same flags.)

Version
rustc 1.93.0-nightly (1d60f9e07 2025-12-01)
binary: rustc
commit-hash: 1d60f9e070c1039b263e0f035c0f03dfcc610d0f
commit-date: 2025-12-01
host: x86_64-unknown-linux-gnu
release: 1.93.0-nightly
LLVM version: 21.1.5
Error output
Backtrace

    Checking server v0.1.0 (/var/home/jak2k/Projects/website/server)
error: internal compiler error: encountered incremental compilation error with evaluate_obligation(d303707cd49c89e8-bedf91044e5103ea)
|
= note: please follow the instructions below to create a bug report with the provided information
= note: for incremental compilation bugs, having a reproduction is vital
= note: an ideal reproduction consists of the code before and some patch that then triggers the bug when applied and compiled again
= note: as a workaround, you can run `cargo clean -p server` or `cargo clean` to allow your project to compile


thread 'rustc' (104485) panicked at /rustc-dev/1d60f9e070c1039b263e0f035c0f03dfcc610d0f/compiler/rustc_query_system/src/query/plumbing.rs:752:9:
Found unstable fingerprints for evaluate_obligation(d303707cd49c89e8-bedf91044e5103ea): Ok(EvaluatedToOk)
stack backtrace:
 0: __rustc::rust_begin_unwind
 1: core::panicking::panic_fmt
 2: rustc_query_system::query::plumbing::incremental_verify_ich_failed::<rustc_middle::ty::context::TyCtxt>
 3: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::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::Erased<[u8; 2]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
 4: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
 5: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
 6: <rustc_trait_selection::traits::engine::ObligationCtxt>::make_canonicalized_query_response::<()>
 7: rustc_traits::type_op::type_op_prove_predicate
    [... omitted 2 frames ...]
 8: <rustc_borrowck::type_check::TypeChecker>::normalize_and_prove_instantiated_predicates
 9: <rustc_borrowck::type_check::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_operand
10: <rustc_borrowck::type_check::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_body
11: rustc_borrowck::type_check::type_check
12: <rustc_borrowck::root_cx::BorrowCheckRootCtxt>::do_mir_borrowck
13: rustc_borrowck::mir_borrowck
    [... omitted 1 frame ...]
14: rustc_hir_analysis::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
15: rustc_hir_analysis::collect::type_of::type_of_opaque
    [... omitted 1 frame ...]
16: <rustc_trait_selection::traits::select::SelectionContext>::confirm_auto_impl_candidate::{closure#0}
17: <rustc_trait_selection::traits::select::SelectionContext>::confirm_candidate
18: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
19: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_predicate_recursively
20: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
21: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation
22: rustc_traits::evaluate_obligation::evaluate_obligation
    [... omitted 2 frames ...]
23: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
24: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
25: <rustc_trait_selection::traits::fulfill::FulfillmentContext<rustc_trait_selection::traits::FulfillmentError> as rustc_infer::traits::engine::TraitEngine<rustc_trait_selection::traits::FulfillmentError>>::evaluate_obligations_error_on_ambiguity
26: <rustc_trait_selection::traits::engine::ObligationCtxt<rustc_trait_selection::traits::FulfillmentError>>::evaluate_obligations_error_on_ambiguity
27: <clippy_lints::future_not_send::FutureNotSend as rustc_lint::passes::LateLintPass>::check_fn
28: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_fn
29: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_item
30: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::process_mod
31: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_item
32: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::process_mod
33: rustc_lint::late::check_crate::{closure#0}
34: rustc_lint::late::check_crate
35: rustc_interface::passes::analysis
    [... omitted 1 frame ...]
36: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
37: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/var/home/jak2k/Projects/website/server/rustc-ice-2025-12-02T20_38_52-104484.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED] -Z higher-ranked-assumptions

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `core::iter::adapters::map::Map<std::collections::hash::map::IntoIter<std::path::PathBuf, alloc::string::String>, {async closure@src/deploy.rs:66:43: 66:70}>: core::iter::traits::collect::IntoIterator`
#1 [type_op_prove_predicate] evaluating `type_op_prove_predicate` `ProvePredicate { predicate: Binder { value: TraitPredicate(<core::iter::adapters::map::Map<std::collections::hash::map::IntoIter<std::path::PathBuf, alloc::string::String>, {async closure@src/deploy.rs:66:43: 66:70}> as core::iter::traits::collect::IntoIterator>, polarity:Positive), bound_vars: [] } }`
#2 [mir_borrowck] borrow-checking `deploy::build`
#3 [type_of_opaque] computing type of opaque `deploy::build::{opaque#0}`
#4 [evaluate_obligation] evaluating trait selection obligation `{coroutine witness@src/deploy.rs:17:89: 46:2}: core::marker::Send`
#5 [analysis] running analysis passes on crate `server`
end of query stack
note: Clippy version: clippy 0.1.93 (1d60f9e070 2025-12-01)

error: could not compile `server` (bin "server") due to 1 previous error

rustc-ice-2025-12-02T20_38_52-104484.txt

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 with the linked server/src/deploy.rs function and the async closure at src/deploy.rs:66, then reproduce with the listed nightly toolchain, -Z higher-ranked-assumptions, and incremental compilation. Compare cargo check with cargo clippy and use cargo clean as the stated workaround. Done means producing a minimal reproduction that still triggers the evaluate_obligation incremental compilation error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.