Skip to content

[ICE]: TypeNs("core_alloc") != Ctor #158769

Description

@Berrysoft

Code

No idea for a minimize one, but it panics on building docs of compio: https://github.com/compio-rs/compio/actions/runs/28681347300/job/85065304962?pr=962

I guess it relates to bumpalo.

Meta

rustc --version --verbose:

rustc 1.98.0-nightly (4c9d2bfe4 2026-07-01)
binary: rustc
commit-hash: 4c9d2bfe4ad7a65669098754964aaebe0ec1ced2
commit-date: 2026-07-01
host: aarch64-apple-darwin
release: 1.98.0-nightly
LLVM version: 22.1.8

Error output

note: rustc 1.98.0-nightly (4c9d2bfe4 2026-07-01) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib

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

query stack during panic:
#0 [attrs_for_def] collecting attributes of `bumpalo::core_alloc`
end of query stack
Backtrace

thread 'rustc' (35886) panicked at /rustc-dev/4c9d2bfe4ad7a65669098754964aaebe0ec1ced2/compiler/rustc_metadata/src/rmeta/decoder.rs:1404:17:
assertion `left == right` failed
  left: TypeNs("core_alloc")
 right: Ctor
stack backtrace:
   0:        0x10ced6b04 - <<std[f584fadf6aa940ec]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[1da32c60e2302306]::fmt::Display>::fmt
   1:        0x10a19fe94 - core[1da32c60e2302306]::fmt::write
   2:        0x10ceed870 - <std[f584fadf6aa940ec]::sys::stdio::unix::Stderr as std[f584fadf6aa940ec]::io::Write>::write_fmt
   3:        0x10ceab48c - std[f584fadf6aa940ec]::panicking::default_hook::{closure#0}
   4:        0x10cec7fa8 - std[f584fadf6aa940ec]::panicking::default_hook
   5:        0x10ad94a80 - std[f584fadf6aa940ec]::panicking::update_hook::<alloc[505b47219afbe7f2]::boxed::Box<rustc_driver_impl[5f1145089bb1c32e]::install_ice_hook::{closure#1}>>::{closure#0}
   6:        0x10cec8574 - std[f584fadf6aa940ec]::panicking::panic_with_hook
   7:        0x10ceab510 - std[f584fadf6aa940ec]::panicking::panic_handler::{closure#0}
   8:        0x10cea1e38 - std[f584fadf6aa940ec]::sys::backtrace::__rust_end_short_backtrace::<std[f584fadf6aa940ec]::panicking::panic_handler::{closure#0}, !>
   9:        0x10ceaca38 - __rustc[32109bd59933d253]::rust_begin_unwind
  10:        0x10cf93bb8 - core[1da32c60e2302306]::panicking::panic_fmt
  11:        0x10cf93ab8 - core[1da32c60e2302306]::panicking::assert_failed_inner
  12:        0x10d0596f0 - core[1da32c60e2302306]::panicking::assert_failed::<rustc_hir[5eb053446a8cd204]::definitions::DefPathData, rustc_hir[5eb053446a8cd204]::definitions::DefPathData>
  13:        0x10b887c70 - <rustc_metadata[a87caf50c257f95f]::rmeta::decoder::CrateMetadata>::get_item_attrs
  14:        0x10b89e344 - rustc_metadata[a87caf50c257f95f]::rmeta::decoder::cstore_impl::provide_extern::attrs_for_def
  15:        0x10c48e7dc - rustc_query_impl[6c510da7d98c9afa]::query_impl::attrs_for_def::invoke_provider_fn::__rust_begin_short_backtrace
  16:        0x10c2d10f4 - rustc_query_impl[6c510da7d98c9afa]::execution::try_execute_query::<rustc_middle[cb46713130672c1e]::query::caches::DefIdCache<rustc_middle[cb46713130672c1e]::query::erase::ErasedData<[u8; 16usize]>>, false>
  17:        0x10c48e8d4 - rustc_query_impl[6c510da7d98c9afa]::query_impl::attrs_for_def::execute_query_non_incr::__rust_end_short_backtrace
  18:        0x104497b70 - <rustc_middle[cb46713130672c1e]::ty::context::TyCtxt>::get_all_attrs::<rustc_span[c6b4604e110a784c]::def_id::DefId>
  19:        0x10469f210 - rustdoc[71e53c31346a91c7]::clean::inline::build_module_items
  20:        0x10469e0d8 - rustdoc[71e53c31346a91c7]::clean::inline::build_module
  21:        0x10469c550 - rustdoc[71e53c31346a91c7]::clean::inline::try_inline
  22:        0x10469ef40 - rustdoc[71e53c31346a91c7]::clean::inline::build_module_items
  23:        0x10469e0d8 - rustdoc[71e53c31346a91c7]::clean::inline::build_module
  24:        0x10469c550 - rustdoc[71e53c31346a91c7]::clean::inline::try_inline
  25:        0x10466dcd0 - rustdoc[71e53c31346a91c7]::clean::clean_use_statement_inner
  26:        0x104665298 - rustdoc[71e53c31346a91c7]::clean::clean_doc_module
  27:        0x104659dac - rustdoc[71e53c31346a91c7]::core::run_global_ctxt
  28:        0x1045bfe24 - rustdoc[71e53c31346a91c7]::main_args::{closure#2}::{closure#0}
  29:        0x1045b8780 - rustc_interface[56d58eb4a477c90d]::interface::run_compiler::<(), rustdoc[71e53c31346a91c7]::main_args::{closure#2}>::{closure#1}
  30:        0x10452faf4 - std[f584fadf6aa940ec]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[56d58eb4a477c90d]::util::run_in_thread_with_globals<rustc_interface[56d58eb4a477c90d]::util::run_in_thread_pool_with_globals<rustc_interface[56d58eb4a477c90d]::interface::run_compiler<(), rustdoc[71e53c31346a91c7]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  31:        0x1045ea6e4 - <std[f584fadf6aa940ec]::thread::lifecycle::spawn_unchecked<rustc_interface[56d58eb4a477c90d]::util::run_in_thread_with_globals<rustc_interface[56d58eb4a477c90d]::util::run_in_thread_pool_with_globals<rustc_interface[56d58eb4a477c90d]::interface::run_compiler<(), rustdoc[71e53c31346a91c7]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[1da32c60e2302306]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  32:        0x10ced36d4 - <std[f584fadf6aa940ec]::sys::thread::unix::Thread>::new::thread_start
  33:        0x189a31c58 - __pthread_cond_wait

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-bisectionStatus: A bisection has been found for this issueT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions