Change:
Running on nightly causes an ICE. Judging by my for PRs this broken between 2 and 4 days ago (26th-28th Jan). See attached minified project: . Essentially, this is: <details<summary<strongBacktrace</strong</summary<p</p</details
I see the same on Docs build fine with latest stable (1.58.1), but I get the same error with
This is probably a duplicate of , right? The fix for that () isn't in yesterday's (2022-01-29) nightly yet, but should be in today's.
I get the same error with , which does include .
works for me on aarch64-apple-darwin, but not on
There are definitely three crates still hitting this ICE on (at least based on message, and backtrace in 2 cases, but I couldn't reproduce on when testing locally) in
You can use () in your code to figure out what change caused this regression.
Not so surprisingly bisection reveals as the cause.
I'm not sure if this is helpful, but this is the stack I get when attempting to run rustdoc with nightly (which is the most recent nightly available on macOS). I also get the same build failure in CI with . This error comes from building the docs on
Fixed in
Assigning same priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-critical
It seems this issue has regressed recently? Hitting the same ICE on . <details<summary<strongBacktrace</strong</summary<p</p</details
The recent regression should be fixed by , most likely.

Discussion:
) } <ins> /// Decodes all inherent impls in the crate (for rustdoc). fn get_inherent_impls(self) -> impl Iterator<Item = (DefId, DefId)> + 'a { (0..self.root.tables.inherent_impls.size()).flat_map(move |i| { let ty_index = DefIndex::from_usize(i); let ty_def_id = self.local_def_id(ty_index); self.root .tables .inherent_impls .get(self, ty_index) .unwrap_or_else(Lazy::empty) .decode(self) .map(move |impl_index| (ty_def_id, self.local_def_id(impl_index))) }) } /// Decodes all traits in the crate (for rustdoc and rustc diagnostics). </ins> fn get_traits(self) -> impl Iterator<Item = DefId> + 'a { self.root.traits.decode(self).map(move |index| self.local_def_id(index)) } <ins> /// Decodes all trait impls in the crate (for rustdoc). </ins> fn get_trait_impls(self) -> impl Iterator<Item = (DefId, DefId, Option<SimplifiedType>)> + 'a { self.cdata.trait_impls.iter().flat_map(move |((trait_cnum_raw, trait_index), impls)| { let trait_def_id = DefId {

self.get_crate_data(cnum).get_proc_macro_quoted_span(id, sess) } <ins> /// Decodes all traits in the crate (for rustdoc). </ins> pub fn traits_in_crate_untracked(&self, cnum: CrateNum) -> impl Iterator<Item = DefId> + '_ { self.get_crate_data(cnum).get_traits() } <ins> /// Decodes all trait impls in the crate (for rustdoc). </ins> pub fn trait_impls_in_crate_untracked( &self, cnum: CrateNum, ) -> impl Iterator<Item = (DefId, DefId, Option<SimplifiedType>)> + '_ { self.get_crate_data(cnum).get_trait_impls() } <ins> /// Decodes all inherent impls in the crate (for rustdoc). pub fn inherent_impls_in_crate_untracked( &self, cnum: CrateNum, ) -> impl Iterator<Item = (DefId, DefId)> + '_ { self.get_crate_data(cnum).get_inherent_impls() } </ins> } impl CrateStore for CStore {

let all_traits = Vec::from_iter(self.resolver.cstore().traits_in_crate_untracked(cnum)); let all_trait_impls = Vec::from_iter(self.resolver.cstore().trait_impls_in_crate_untracked(cnum)); <ins> let all_inherent_impls = Vec::from_iter(self.resolver.cstore().inherent_impls_in_crate_untracked(cnum)); </ins> // Querying traits in scope is expensive so we try to prune the impl and traits lists // using privacy, private traits and impls from other crates are never documented in

self.add_traits_in_parent_scope(impl_def_id); } } <ins> for (ty_def_id, impl_def_id) in all_inherent_impls { if self.resolver.cstore().visibility_untracked(ty_def_id) == Visibility::Public { self.add_traits_in_parent_scope(impl_def_id); } } </ins> self.all_traits.extend(all_traits); self.all_trait_impls.extend(all_trait_impls.into_iter().map(|(_, def_id, _)| def_id));

<ins> #[derive(Clone)] pub struct PublicStruct; mod inner { use super::PublicStruct; impl PublicStruct { /// [PublicStruct::clone] pub fn method() {} } } </ins>

<ins> // Reexport of a structure with public inherent impls having doc links in their comments. The doc // link points to an associated item, so we check that traits in scope for that link are populated. // aux-build:extern-inherent-impl-dep.rs extern crate extern_inherent_impl_dep; pub use extern_inherent_impl_dep::PublicStruct; </ins>