Change:
<!-- [31mICE[0m: Rustc '-Zincremental-verify-ich=yes -Cincremental=<dir-Cdebuginfo=2' 'thread 'rustc' panicked at 'called on a value'', 'thread 'rustc' panicked at 'called on a value'' File: --auto-reduced (treereduce-rust): original: Version information Command: &lt;!-- Include a backtrace in the code block by setting in your environment. E.g. . --&lt;details&lt;summary&lt;strongProgram output&lt;/strong&lt;/summary&lt;p&lt;/p&lt;/details&lt;!-- query stack: note: compiler flags: -Z incremental-verify-ich=yes -C incremental=[REDACTED] -C debuginfo=2 [associatedtypeforimpltraitintrait] creating the associated item corresponding to the opaque type [associatedtypesforimpltraitsinassociatedfn] creating associated items for opaque types returned by [associateditemdefids] collecting associated items or fields of [associateditems] collecting associated items of [checkwellformed] checking that is well-formed [checkmodtypewf] checking that types are well-formed in top-level module [analysis] running analysis passes on this crate --
This will probably make a simple crash in a lot of cases :3
cc
minimal repro:
Hmm, when writing I tried to trigger the case by enabling , but it didn't ICE. I'll check what is the difference with what cargo does.
Fixed in
A workaround to this issue should be to use or which should disable incremental compilation.
run on nightly rust also  but. if you use to switch stable version rust will be run will successful
There’s also an environment variable to control incremental compilation, so you could set CARGO_INCREMENTAL=0 to do that.
I think this error should be completely fixed, otherwise it will still fail to compile in the IDE environment and the automatic build environment of GitHub Action
Sure, we were just offering a workaround to unblock people temporarily. The fix is already present on master and should be available in tomorrow’s nightly.
Oh, this is great

Discussion:
let bodies = SortedMap::from_presorted_elements(bodies); // Don't hash unless necessary, because it's expensive. <del> let (opt_hash_including_bodies, attrs_hash) = if self.tcx.needs_crate_hash() { self.tcx.with_stable_hashing_context(|mut hcx| { let mut stable_hasher = StableHasher::new(); node.hash_stable(&mut hcx, &mut stable_hasher); // Bodies are stored out of line, so we need to pull them explicitly in the hash. bodies.hash_stable(&mut hcx, &mut stable_hasher); let h1 = stable_hasher.finish(); let mut stable_hasher = StableHasher::new(); attrs.hash_stable(&mut hcx, &mut stable_hasher); let h2 = stable_hasher.finish(); (Some(h1), Some(h2)) }) } else { (None, None) }; </del> <ins> let (opt_hash_including_bodies, attrs_hash) = self.tcx.hash_owner_nodes(node, &bodies, &attrs); </ins> let num_nodes = self.item_local_id_counter.as_usize(); let (nodes, parenting) = index::index_hir(self.tcx, node, &bodies, num_nodes); let nodes = hir::OwnerNodes { opt_hash_including_bodies, nodes, bodies };

use crate::query::Providers; use crate::ty::{EarlyBinder, ImplSubject, TyCtxt}; <ins> use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::sorted_map::SortedMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; </ins> use rustc_data_structures::sync::{try_par_for_each_in, DynSend, DynSync}; use rustc_hir::def::DefKind; use rustc_hir::def_id::{DefId, LocalDefId, LocalModDefId};

self.opt_parent(def_id.into()) .is_some_and(|parent| matches!(self.def_kind(parent), DefKind::ForeignMod)) } <ins> pub fn hash_owner_nodes( self, node: OwnerNode<'_>, bodies: &SortedMap<ItemLocalId, &Body<'_>>, attrs: &SortedMap<ItemLocalId, &[rustc_ast::Attribute]>, ) -> (Option<Fingerprint>, Option<Fingerprint>) { if self.needs_crate_hash() { self.with_stable_hashing_context(|mut hcx| { let mut stable_hasher = StableHasher::new(); node.hash_stable(&mut hcx, &mut stable_hasher); // Bodies are stored out of line, so we need to pull them explicitly in the hash. bodies.hash_stable(&mut hcx, &mut stable_hasher); let h1 = stable_hasher.finish(); let mut stable_hasher = StableHasher::new(); attrs.hash_stable(&mut hcx, &mut stable_hasher); let h2 = stable_hasher.finish(); (Some(h1), Some(h2)) }) } else { (None, None) } } </ins> } pub fn provide(providers: &mut Providers) {

fn feed_hir(feed: &TyCtxtFeed<'_, LocalDefId>) { feed.local_def_id_to_hir_id(HirId::make_owner(feed.def_id())); <ins> let node = hir::OwnerNode::AssocOpaqueTy(&hir::AssocOpaqueTy {}); let bodies = Default::default(); let attrs = hir::AttributeMap::EMPTY; let (opt_hash_including_bodies, _) = feed.tcx.hash_owner_nodes(node, &bodies, &attrs.map); </ins> feed.opt_hir_owner_nodes(Some(feed.tcx.arena.alloc(hir::OwnerNodes { <del> opt_hash_including_bodies: None, </del> <ins> opt_hash_including_bodies, </ins> nodes: IndexVec::from_elem_n( hir::ParentedNode { parent: hir::ItemLocalId::INVALID,

}, 1, ), <del> bodies: Default::default(), </del> <ins> bodies, </ins> }))); <del> feed.feed_owner_id().hir_attrs(hir::AttributeMap::EMPTY); </del> <ins> feed.feed_owner_id().hir_attrs(attrs); </ins> } /// Given an `opaque_ty_def_id` corresponding to an `impl Trait` in an associated

<ins> // Issue #122508 //@ check-pass //@ incremental //@ edition:2021 trait MyTrait { async fn bar(&self) -> i32; } fn main() {} </ins>