rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

Clippy: Unstable fingerprints for `evaluate_obligation` triggered by `future_not_send` lint on async closure

Open strinnityk opened this issue 7 months ago • 4 comments

Summary

I was trying to make a commit for the logos-blockchain-tests crate in Logos Blockchain, branch test/c-bindings/basic-lifecycle. As part of my pre-commit hooks, one of the steps runs clippy. When running it, I got the following issue:

Found unstable fingerprints for evaluate_obligation(e390502cb7b1ace2-8c347d2354097345): Ok(EvaluatedToOk)

Version

rustc 1.95.0 (59807616e 2026-04-14)
binary: rustc
commit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860
commit-date: 2026-04-14
host: x86_64-unknown-linux-gnu
release: 1.95.0
LLVM version: 22.1.2

Error output

Backtrace

git commit -m "Apply temporary workaround to avoid validating SDP transactions from genesis." fmt......................................................................Passed cargo clippy.............................................................Failed - hook id: clippy - exit code: 101

Blocking waiting for file lock on build directory

Compiling logos-blockchain-circuits-utils v0.1.2 (/home/strinnityk/Projects/nomos/zk/circuits/utils) Checking logos-blockchain-witness-generator v0.1.2 (/home/strinnityk/Projects/nomos/zk/circuits/witness-generator) Compiling logos-blockchain-key-management-system-macros v0.1.2 (/home/strinnityk/Projects/nomos/kms/macros) Compiling logos-blockchain-node v0.1.2 (/home/strinnityk/Projects/nomos/nodes/node/binary) Compiling logos-blockchain-c v0.1.2 (/home/strinnityk/Projects/nomos/c-bindings) Checking logos-blockchain-circuits-prover v0.1.2 (/home/strinnityk/Projects/nomos/zk/circuits/prover) Checking logos-blockchain-circuits-verifier v0.1.2 (/home/strinnityk/Projects/nomos/zk/circuits/verifier) Compiling logos-blockchain-pol v0.1.2 (/home/strinnityk/Projects/nomos/zk/proofs/pol) Compiling logos-blockchain-poq v0.1.2 (/home/strinnityk/Projects/nomos/zk/proofs/poq) Compiling logos-blockchain-zksign v0.1.2 (/home/strinnityk/Projects/nomos/zk/proofs/zksign) Compiling logos-blockchain-poc v0.1.2 (/home/strinnityk/Projects/nomos/zk/proofs/poc) Checking logos-blockchain-cryptarchia-engine v0.1.2 (/home/strinnityk/Projects/nomos/consensus/cryptarchia-engine) Checking logos-blockchain-key-management-system-keys v0.1.2 (/home/strinnityk/Projects/nomos/kms/keys) Checking logos-blockchain-time-service v0.1.2 (/home/strinnityk/Projects/nomos/services/time) Checking logos-blockchain-blend-crypto v0.1.2 (/home/strinnityk/Projects/nomos/blend/crypto) Checking logos-blockchain-blend-proofs v0.1.2 (/home/strinnityk/Projects/nomos/blend/proofs) Checking logos-blockchain-core v0.1.2 (/home/strinnityk/Projects/nomos/core) Checking logos-blockchain-cryptarchia-sync v0.1.2 (/home/strinnityk/Projects/nomos/consensus/cryptarchia-sync) Checking logos-blockchain-blend-message v0.1.2 (/home/strinnityk/Projects/nomos/blend/message) Checking logos-blockchain-storage-service v0.1.2 (/home/strinnityk/Projects/nomos/services/storage) Checking logos-blockchain-chain-broadcast-service v0.1.2 (/home/strinnityk/Projects/nomos/services/chain/broadcast-service) Checking logos-blockchain-key-management-system-operators v0.1.2 (/home/strinnityk/Projects/nomos/kms/operators) Checking logos-blockchain-http-api-common v0.1.2 (/home/strinnityk/Projects/nomos/nodes/api-common) Checking logos-blockchain-chain-service-common v0.1.2 (/home/strinnityk/Projects/nomos/services/chain/chain-common) Checking logos-blockchain-key-management-system-service v0.1.2 (/home/strinnityk/Projects/nomos/services/key-management-system) Checking logos-blockchain-libp2p v0.1.2 (/home/strinnityk/Projects/nomos/libp2p) Checking logos-blockchain-ledger v0.1.2 (/home/strinnityk/Projects/nomos/ledger) Checking logos-blockchain-blend-scheduling v0.1.2 (/home/strinnityk/Projects/nomos/blend/scheduling) Checking logos-blockchain-network-service v0.1.2 (/home/strinnityk/Projects/nomos/services/network) Checking logos-blockchain-blend-network v0.1.2 (/home/strinnityk/Projects/nomos/blend/network) Checking logos-blockchain-wallet v0.1.2 (/home/strinnityk/Projects/nomos/wallet) Checking logos-blockchain-chain-service v0.1.2 (/home/strinnityk/Projects/nomos/services/chain/chain-service) Checking logos-blockchain-tx-service v0.1.2 (/home/strinnityk/Projects/nomos/services/tx-service) Checking logos-blockchain-blend v0.1.2 (/home/strinnityk/Projects/nomos/blend/core) Checking logos-blockchain-common-http-client v0.1.2 (/home/strinnityk/Projects/nomos/nodes/node/http-client) Checking logos-blockchain-sdp-service v0.1.2 (/home/strinnityk/Projects/nomos/services/sdp) Checking logos-blockchain-wallet-service v0.1.2 (/home/strinnityk/Projects/nomos/services/wallet) Checking logos-blockchain-chain-network-service v0.1.2 (/home/strinnityk/Projects/nomos/services/chain/chain-network) Checking logos-blockchain-zone-sdk v0.1.2 (/home/strinnityk/Projects/nomos/zone-sdk) Checking logos-blockchain-demo-sequencer v0.1.2 (/home/strinnityk/Projects/nomos/testnet/l2-sequencer-archival-demo/sequencer) Checking logos-blockchain-wallet-http-client v0.1.2 (/home/strinnityk/Projects/nomos/wallet-http-client) Checking logos-blockchain-blend-service v0.1.2 (/home/strinnityk/Projects/nomos/services/blend) Checking logos-blockchain-demo-archiver v0.1.2 (/home/strinnityk/Projects/nomos/testnet/l2-sequencer-archival-demo/archiver) Checking logos-blockchain-tui-zone v0.1.2 (/home/strinnityk/Projects/nomos/testnet/tui-zone) Checking logos-blockchain-chain-leader-service v0.1.2 (/home/strinnityk/Projects/nomos/services/chain/chain-leader) Checking logos-blockchain-api-service v0.1.2 (/home/strinnityk/Projects/nomos/services/api) Checking lb_config v0.1.2 (/home/strinnityk/Projects/nomos/tools/config) Checking logos-blockchain-faucet v0.1.2 (/home/strinnityk/Projects/nomos/testnet/faucet) Checking logos-blockchain-tools v0.1.2 (/home/strinnityk/Projects/nomos/tools/blockchain-tools) Checking testing_framework v0.1.2 (/home/strinnityk/Projects/nomos/tests/testing_framework) Checking logos-blockchain-tests v0.1.2 (/home/strinnityk/Projects/nomos/tests) Checking logos-blockchain-cfgsync v0.1.2 (/home/strinnityk/Projects/nomos/testnet/cfgsync) error: internal compiler error: encountered incremental compilation error with evaluate_obligation(e390502cb7b1ace2-8c347d2354097345) | = 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 test_zone_sdk_e2e or cargo clean to allow your project to compile

thread 'rustc' (324698) panicked at /rustc-dev/59807616e1fa2540724bfbac14d7976d7e4a3860/compiler/rustc_middle/src/verify_ich.rs:80:9: Found unstable fingerprints for evaluate_obligation(e390502cb7b1ace2-8c347d2354097345): Ok(EvaluatedToOk) stack backtrace: 0: 0x7f3d84d9314b - <<std[e28293b1aa0f68bd]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[c1f1a4ba060b9bfa]::fmt::Display>::fmt 1: 0x7f3d8541f408 - core[c1f1a4ba060b9bfa]::fmt::write 2: 0x7f3d869683b6 - <std[e28293b1aa0f68bd]::sys::stdio::unix::Stderr as std[e28293b1aa0f68bd]::io::Write>::write_fmt 3: 0x7f3d84d69238 - std[e28293b1aa0f68bd]::panicking::default_hook::{closure#0} 4: 0x7f3d84d865b3 - std[e28293b1aa0f68bd]::panicking::default_hook 5: 0x7f3d83d5cc30 - std[e28293b1aa0f68bd]::panicking::update_hook::<alloc[fdfd2bd8633a6659]::boxed::Box<rustc_driver_impl[e4ca9dd5dd6cf2a8]::install_ice_hook::{closure#1}>>::{closure#0} 6: 0x7f3d84d86892 - std[e28293b1aa0f68bd]::panicking::panic_with_hook 7: 0x7f3d84d692f8 - std[e28293b1aa0f68bd]::panicking::panic_handler::{closure#0} 8: 0x7f3d84d60029 - std[e28293b1aa0f68bd]::sys::backtrace::__rust_end_short_backtrace::<std[e28293b1aa0f68bd]::panicking::panic_handler::{closure#0}, !> 9: 0x7f3d84d6ad5d - __rustc[b7974e8690430dd9]::rust_begin_unwind 10: 0x7f3d81ade82c - core[c1f1a4ba060b9bfa]::panicking::panic_fmt 11: 0x7f3d843987d8 - rustc_middle[9956b31dc9b62104]::verify_ich::incremental_verify_ich_failed 12: 0x7f3d85967d2b - rustc_middle[9956b31dc9b62104]::verify_ich::incremental_verify_ich::<rustc_middle[9956b31dc9b62104]::query::erase::ErasedData<[u8; 2usize]>> 13: 0x7f3d85ce4929 - rustc_query_impl[b21371cac9e22a84]::execution::try_execute_query::<rustc_middle[9956b31dc9b62104]::query::caches::DefaultCache<rustc_type_ir[9c1281d1b8893e1d]::canonical::CanonicalQueryInput<rustc_middle[9956b31dc9b62104]::ty::context::TyCtxt, rustc_middle[9956b31dc9b62104]::ty::ParamEnvAnd<rustc_middle[9956b31dc9b62104]::ty::predicate::Predicate>>, rustc_middle[9956b31dc9b62104]::query::erase::ErasedData<[u8; 2usize]>>, true> 14: 0x7f3d85ce2982 - rustc_query_impl[b21371cac9e22a84]::query_impl::evaluate_obligation::execute_query_incr::__rust_end_short_backtrace 15: 0x7f3d85bf6d87 - <rustc_trait_selection[79d0130c2732d367]::traits::fulfill::FulfillProcessor as rustc_data_structures[2c167692117eb14d]::obligation_forest::ObligationProcessor>::process_obligation 16: 0x7f3d85406c01 - <rustc_data_structures[2c167692117eb14d]::obligation_forest::ObligationForest<rustc_trait_selection[79d0130c2732d367]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[79d0130c2732d367]::traits::fulfill::FulfillProcessor> 17: 0x7f3d858f30f9 - <rustc_trait_selection[79d0130c2732d367]::traits::engine::ObligationCtxt>::make_canonicalized_query_response::<()> 18: 0x7f3d858ed0a0 - rustc_traits[bd42b8ac0103835d]::type_op::type_op_prove_predicate 19: 0x7f3d85cf7d1e - rustc_query_impl[b21371cac9e22a84]::execution::try_execute_query::<rustc_middle[9956b31dc9b62104]::query::caches::DefaultCache<rustc_type_ir[9c1281d1b8893e1d]::canonical::CanonicalQueryInput<rustc_middle[9956b31dc9b62104]::ty::context::TyCtxt, rustc_middle[9956b31dc9b62104]::ty::ParamEnvAnd<rustc_middle[9956b31dc9b62104]::traits::query::type_op::ProvePredicate>>, rustc_middle[9956b31dc9b62104]::query::erase::ErasedData<[u8; 8usize]>>, true> 20: 0x7f3d85cf6a18 - rustc_query_impl[b21371cac9e22a84]::query_impl::type_op_prove_predicate::execute_query_incr::__rust_end_short_backtrace 21: 0x7f3d85a76908 - <rustc_borrowck[70f000df51ab9cb4]::type_check::TypeChecker>::normalize_and_prove_instantiated_predicates 22: 0x7f3d8261ab26 - <rustc_borrowck[70f000df51ab9cb4]::type_check::TypeChecker as rustc_middle[9956b31dc9b62104]::mir::visit::Visitor>::visit_operand 23: 0x7f3d86346393 - <rustc_borrowck[70f000df51ab9cb4]::type_check::TypeChecker as rustc_middle[9956b31dc9b62104]::mir::visit::Visitor>::visit_body 24: 0x7f3d8632ff29 - rustc_borrowck[70f000df51ab9cb4]::type_check::type_check 25: 0x7f3d864a7def - <rustc_borrowck[70f000df51ab9cb4]::root_cx::BorrowCheckRootCtxt>::do_mir_borrowck 26: 0x7f3d864a3736 - rustc_borrowck[70f000df51ab9cb4]::mir_borrowck 27: 0x7f3d864a3567 - rustc_query_impl[b21371cac9e22a84]::query_impl::mir_borrowck::invoke_provider_fn::__rust_begin_short_backtrace 28: 0x7f3d8553cc7d - rustc_query_impl[b21371cac9e22a84]::execution::try_execute_query::<rustc_data_structures[2c167692117eb14d]::vec_cache::VecCache<rustc_span[e3c9a1967c4921fd]::def_id::LocalDefId, rustc_middle[9956b31dc9b62104]::query::erase::ErasedData<[u8; 8usize]>, rustc_middle[9956b31dc9b62104]::dep_graph::graph::DepNodeIndex>, true> 29: 0x7f3d855a83d1 - rustc_query_impl[b21371cac9e22a84]::query_impl::mir_borrowck::execute_query_incr::__rust_end_short_backtrace 30: 0x7f3d866f2448 - rustc_hir_analysis[1442f5e3e8e9992f]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit 31: 0x7f3d866f211c - rustc_hir_analysis[1442f5e3e8e9992f]::collect::type_of::type_of_opaque 32: 0x7f3d85545205 - rustc_query_impl[b21371cac9e22a84]::execution::try_execute_query::<rustc_middle[9956b31dc9b62104]::query::caches::DefIdCache<rustc_middle[9956b31dc9b62104]::query::erase::ErasedData<[u8; 8usize]>>, true> 33: 0x7f3d8697737c - rustc_query_impl[b21371cac9e22a84]::query_impl::type_of_opaque::execute_query_incr::__rust_end_short_backtrace 34: 0x7f3d859a885c - <rustc_trait_selection[79d0130c2732d367]::traits::select::SelectionContext>::confirm_auto_impl_candidate::{closure#0} 35: 0x7f3d85f05bd8 - <rustc_trait_selection[79d0130c2732d367]::traits::select::SelectionContext>::confirm_candidate 36: 0x7f3d85f2ac60 - <rustc_trait_selection[79d0130c2732d367]::traits::select::SelectionContext>::evaluate_trait_predicate_recursively 37: 0x7f3d85471bd3 - <rustc_trait_selection[79d0130c2732d367]::traits::select::SelectionContext>::evaluate_root_obligation 38: 0x7f3d8546febc - rustc_traits[bd42b8ac0103835d]::evaluate_obligation::evaluate_obligation 39: 0x7f3d8546f80b - rustc_query_impl[b21371cac9e22a84]::query_impl::evaluate_obligation::invoke_provider_fn::__rust_begin_short_backtrace 40: 0x7f3d85ce48d6 - rustc_query_impl[b21371cac9e22a84]::execution::try_execute_query::<rustc_middle[9956b31dc9b62104]::query::caches::DefaultCache<rustc_type_ir[9c1281d1b8893e1d]::canonical::CanonicalQueryInput<rustc_middle[9956b31dc9b62104]::ty::context::TyCtxt, rustc_middle[9956b31dc9b62104]::ty::ParamEnvAnd<rustc_middle[9956b31dc9b62104]::ty::predicate::Predicate>>, rustc_middle[9956b31dc9b62104]::query::erase::ErasedData<[u8; 2usize]>>, true> 41: 0x7f3d85ce2982 - rustc_query_impl[b21371cac9e22a84]::query_impl::evaluate_obligation::execute_query_incr::__rust_end_short_backtrace 42: 0x7f3d85bf6d87 - <rustc_trait_selection[79d0130c2732d367]::traits::fulfill::FulfillProcessor as rustc_data_structures[2c167692117eb14d]::obligation_forest::ObligationProcessor>::process_obligation 43: 0x7f3d85406c01 - <rustc_data_structures[2c167692117eb14d]::obligation_forest::ObligationForest<rustc_trait_selection[79d0130c2732d367]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[79d0130c2732d367]::traits::fulfill::FulfillProcessor> 44: 0x7f3d85dc7eb0 - <rustc_trait_selection[79d0130c2732d367]::traits::fulfill::FulfillmentContext<rustc_trait_selection[79d0130c2732d367]::traits::FulfillmentError> as rustc_infer[356adc6d7f839a70]::traits::engine::TraitEngine<rustc_trait_selection[79d0130c2732d367]::traits::FulfillmentError>>::evaluate_obligations_error_on_ambiguity 45: 0x55640ef0f321 - <rustc_trait_selection[79d0130c2732d367]::traits::engine::ObligationCtxt<rustc_trait_selection[79d0130c2732d367]::traits::FulfillmentError>>::evaluate_obligations_error_on_ambiguity 46: 0x55640f00e55a - <clippy_lints[2bd58402bd437290]::future_not_send::FutureNotSend as rustc_lint[754bcbf59f34f28d]::passes::LateLintPass>::check_fn 47: 0x7f3d842c42e8 - <rustc_lint[754bcbf59f34f28d]::late::LateContextAndPass<rustc_lint[754bcbf59f34f28d]::late::RuntimeCombinedLateLintPass> as rustc_hir[b3c1514e930b846b]::intravisit::Visitor>::visit_fn 48: 0x7f3d842d9aac - <rustc_lint[754bcbf59f34f28d]::late::LateContextAndPass<rustc_lint[754bcbf59f34f28d]::late::RuntimeCombinedLateLintPass> as rustc_hir[b3c1514e930b846b]::intravisit::Visitor>::visit_nested_item 49: 0x7f3d8425fe09 - <rustc_lint[754bcbf59f34f28d]::late::LateContextAndPass<rustc_lint[754bcbf59f34f28d]::late::RuntimeCombinedLateLintPass>>::process_mod 50: 0x7f3d8624cab7 - rustc_lint[754bcbf59f34f28d]::late::check_crate::{closure#0} 51: 0x7f3d8624bdbf - rustc_lint[754bcbf59f34f28d]::late::check_crate 52: 0x7f3d862490f6 - rustc_interface[c8170c4b7b680ee8]::passes::analysis::{closure#0}::{closure#0}::{closure#2} 53: 0x7f3d86248ed7 - rustc_data_structures[2c167692117eb14d]::sync::parallel::par_fns 54: 0x7f3d86248e66 - rustc_interface[c8170c4b7b680ee8]::passes::analysis::{closure#0}::{closure#0} 55: 0x7f3d86248ed7 - rustc_data_structures[2c167692117eb14d]::sync::parallel::par_fns 56: 0x7f3d85536ad7 - rustc_interface[c8170c4b7b680ee8]::passes::analysis 57: 0x7f3d869ec447 - rustc_query_impl[b21371cac9e22a84]::execution::try_execute_query::<rustc_middle[9956b31dc9b62104]::query::caches::SingleCache<rustc_middle[9956b31dc9b62104]::query::erase::ErasedData<[u8; 0usize]>>, true> 58: 0x7f3d869ebdb4 - rustc_query_impl[b21371cac9e22a84]::query_impl::analysis::execute_query_incr::__rust_end_short_backtrace 59: 0x7f3d8665632d - rustc_interface[c8170c4b7b680ee8]::interface::run_compiler::<(), rustc_driver_impl[e4ca9dd5dd6cf2a8]::run_compiler::{closure#0}>::{closure#1} 60: 0x7f3d8662663e - std[e28293b1aa0f68bd]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c8170c4b7b680ee8]::util::run_in_thread_with_globals<rustc_interface[c8170c4b7b680ee8]::util::run_in_thread_pool_with_globals<rustc_interface[c8170c4b7b680ee8]::interface::run_compiler<(), rustc_driver_impl[e4ca9dd5dd6cf2a8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> 61: 0x7f3d86626ca0 - <std[e28293b1aa0f68bd]::thread::lifecycle::spawn_unchecked<rustc_interface[c8170c4b7b680ee8]::util::run_in_thread_with_globals<rustc_interface[c8170c4b7b680ee8]::util::run_in_thread_pool_with_globals<rustc_interface[c8170c4b7b680ee8]::interface::run_compiler<(), rustc_driver_impl[e4ca9dd5dd6cf2a8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[c1f1a4ba060b9bfa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 62: 0x7f3d86627b2c - <std[e28293b1aa0f68bd]::sys::thread::unix::Thread>::new::thread_start 63: 0x7f3d800787b9 - start_thread 64: 0x7f3d800fcacc - __clone3 65: 0x0 -

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: rustc 1.95.0 (59807616e 2026-04-14) running on x86_64-unknown-linux-gnu

note: compiler flags: -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 core::iter::adapters::map::Map<alloc::vec::into_iter::IntoIter<(logos_blockchain_zone_sdk::sequencer::SequencerHandle<logos_blockchain_zone_sdk::adapter::NodeHttpClient>, alloc::vec::Vec<alloc::vec::Vec<u8>>)>, {async closure@tests/src/tests/zone_sdk/e2e.rs:540:35: 540:57}>: 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<alloc::vec::into_iter::IntoIter<(logos_blockchain_zone_sdk::sequencer::SequencerHandle<logos_blockchain_zone_sdk::adapter::NodeHttpClient>, alloc::vec::Vec<alloc::vec::Vec<u8>>)>, {async closure@tests/src/tests/zone_sdk/e2e.rs:540:35: 540:57}> as core::iter::traits::collect::IntoIterator>, polarity:Positive), bound_vars: [] } } ... and 4 other queries... use env RUST_BACKTRACE=1 to see the full query stack note: Clippy version: clippy 0.1.95 (59807616e1 2026-04-14)

error: could not compile logos-blockchain-tests (test "test_zone_sdk_e2e") due to 1 previous error warning: build failed, waiting for other jobs to finish...

check Cargo dependencies.............................(no files to check)Skipped taplo-format.........................................(no files to check)Skipped taplo-lint...........................................(no files to check)Skipped cargo-machete........................................(no files to check)Skipped

strinnityk avatar Apr 30 '26 16:04 strinnityk

@rustbot claim

I looked into this. The lint already excludes closures via an early FnKind::Closure return at clippy_lints/src/future_not_send.rs:74, so the lint is not running on the async closure itself. What is almost certainly happening is that an outer async fn returns an opaque future whose witness captures the inner async closure type, and when clippy asks the trait solver whether that opaque future is Send via evaluate_obligations_error_on_ambiguity, the query result hashes inconsistently across rustc's incremental verification rerun and trips the fingerprint assertion.

The "Found unstable fingerprints for evaluate_obligation" message is emitted by rustc's incremental_verify_ich, not by clippy. It is a non-determinism check on the trait solver itself. Any consumer that asks the same Send question (rustdoc auto-trait synthesis, other lints, user code with explicit bounds) would trip the same assertion. Clippy is the messenger, the bug is in rustc's handling of async-closure-captured types during Send evaluation.

Given that, I do not think a clippy-side patch is the right fix. The options on our side are all heuristic: walking the opaque type's hidden witnesses to detect coroutine-closure captures and bailing early, or wrapping the obligation context in a panic catcher, both of which would silently drop legitimate diagnostics and would not actually fix the underlying query non-determinism. The lint is nursery and off by default, and a local #[allow(clippy::future_not_send)] on the affected function is a clean workaround for anyone hitting this today.

To make progress, the most useful next step is a minimal reproducer. The current report points at building an internal crate, which neither side can act on. If you can share the smallest async fn plus async || shape that triggers it, ideally reduced with cargo-minimize or by hand, I would suggest filing it on rust-lang/rust against the trait solver and async-closures areas and linking back here, since the fix needs to land there.

In the meantime, dropping future_not_send from your lint config or adding the #[allow] on the offending function should unblock your pre-commit hook.

Souradip121 avatar Apr 30 '26 19:04 Souradip121

To make progress, the most useful next step is a minimal reproducer. The current report points at building an internal crate, which neither side can act on. If you can share the smallest async fn plus async || shape that triggers it, ideally reduced with cargo-minimize or by hand, I would suggest filing it on rust-lang/rust against the trait solver and async-closures areas and linking back here, since the fix needs to land there.

I tried but I couldn't produce a working example. Any tips or ideas on how to proceed?

strinnityk avatar May 04 '26 20:05 strinnityk

I tried but I couldn't produce a working example. Any tips or ideas on how to proceed?

Do you have a function which triggers the ICE? If you can remove everything else, and still get the ICE, do that (if the function uses values of types defined in the crate, try either removing those values, replacing the crate-defined types with some builtin/std types, or at the very least minimize the crate-defined types by removing and simplifying fields/variants etc.). Then remove one statement at a time from the function while the ICE is still triggered. If at some point you can't minimize further, send what you have.

ada4a avatar May 06 '26 20:05 ada4a

We are in luck that this will be (at least the upstream blocking issue I identified is labeled by this) fixed by the next solver 🎉 All hail the next solver!

See https://blog.rust-lang.org/2026/08/21/enabling-next-solver-on-nightly/ for more context

CommanderStorm avatar Sep 16 '26 21:09 CommanderStorm