Skip to content

ICE assertion failed: !name.is_empty() #140110

Open
@ZettaScript

Description

@ZettaScript

Steps

Create a new crate: cargo new foo, edit Cargo.toml:

[package]
name = "foo"
version = "0.1.0"
edition = "2024"

[dependencies]
bevy = { version = "0.15.3", features = [] }
bevy_ecs_ldtk = "0.11.0"
bevy-inspector-egui = "0.30.0"
bevy_rapier2d = "0.29.0"

Then execute cargo doc --no-deps -p bevy

Meta

rustc --version --verbose:

rustc 1.88.0-nightly (b8c54d635 2025-04-20)
binary: rustc
commit-hash: b8c54d6358926028ac2fab1ec2b8665c70edb1c0
commit-date: 2025-04-20
host: x86_64-unknown-linux-gnu
release: 1.88.0-nightly
LLVM version: 20.1.2

Error output

 Documenting bevy v0.15.3

thread 'rustc' panicked at compiler/rustc_middle/src/ty/assoc.rs:253:9:
assertion failed: !name.is_empty()
stack backtrace:
   0:     0x7ff2514c4413 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h7fb8f30265ccc56b
   1:     0x7ff251c05b07 - core::fmt::write::h1b52a4a62a366744
   2:     0x7ff2530a4b11 - std::io::Write::write_fmt::h39bc3b6777f58555
   3:     0x7ff2514c4272 - std::sys::backtrace::BacktraceLock::print::h5ec4261d8e8d8742
   4:     0x7ff2514c7bea - std::panicking::default_hook::{{closure}}::h6e8e871f9f79d30c
   5:     0x7ff2514c776f - std::panicking::default_hook::hd58a6cf4c22ae148
   6:     0x7ff250545f73 - std[d6740322a10ebed4]::panicking::update_hook::<alloc[bb220a8bd3d69e51]::boxed::Box<rustc_driver_impl[bca0721b9e93e088]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7ff2514c8463 - std::panicking::rust_panic_with_hook::h783da2c6e30b09a6
   8:     0x7ff2514c8126 - std::panicking::begin_panic_handler::{{closure}}::he7eb868a84f6b265
   9:     0x7ff2514c48e9 - std::sys::backtrace::__rust_end_short_backtrace::h7689eaf4a4621f46
  10:     0x7ff2514c7e1d - __rustc[303c371d2daf9b8b]::rust_begin_unwind
  11:     0x7ff24de87940 - core::panicking::panic_fmt::h8618a7a8240a8522
  12:     0x7ff24de8c72c - core::panicking::panic::h52e6b4f8ffe2a408
  13:     0x7ff2533ddff1 - <rustc_middle[1a15371b1152669f]::ty::assoc::AssocItems>::filter_by_name_unhygienic.cold
  14:     0x55f173789fa0 - rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::filter_assoc_items_by_name_and_namespace
  15:     0x55f1735da2ab - <core[b19db243f5c50a85]::iter::adapters::map::Map<core[b19db243f5c50a85]::iter::adapters::flatten::FlatMap<core[b19db243f5c50a85]::slice::iter::Iter<rustc_span[2a2b5aaadea88a52]::def_id::DefId>, core[b19db243f5c50a85]::iter::adapters::filter::Filter<core[b19db243f5c50a85]::iter::adapters::map::Map<core[b19db243f5c50a85]::iter::adapters::map_while::MapWhile<core[b19db243f5c50a85]::slice::iter::Iter<u32>, <rustc_data_structures[81a00d8918286bd5]::sorted_map::index_map::SortedIndexMultiMap<u32, core[b19db243f5c50a85]::option::Option<rustc_span[2a2b5aaadea88a52]::symbol::Symbol>, rustc_middle[1a15371b1152669f]::ty::assoc::AssocItem>>::get_by_key_enumerated::{closure#1}>, <rustc_data_structures[81a00d8918286bd5]::sorted_map::index_map::SortedIndexMultiMap<u32, core[b19db243f5c50a85]::option::Option<rustc_span[2a2b5aaadea88a52]::symbol::Symbol>, rustc_middle[1a15371b1152669f]::ty::assoc::AssocItem>>::get_by_key::{closure#0}>, rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::filter_assoc_items_by_name_and_namespace::{closure#0}>, <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item::{closure#2}>, <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item::{closure#3}> as core[b19db243f5c50a85]::iter::traits::iterator::Iterator>::next
  16:     0x55f17378d4a0 - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
  17:     0x55f17378b981 - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector>::resolve
  18:     0x55f173791e4f - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector>::resolve_link
  19:     0x55f1737eea80 - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector>::resolve_links
  20:     0x55f1737c35a5 - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector as rustdoc[28cdcec723180595]::visit::DocVisitor>::visit_inner_recur
  21:     0x55f1737c35e0 - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector as rustdoc[28cdcec723180595]::visit::DocVisitor>::visit_inner_recur
  22:     0x55f1737c35e0 - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector as rustdoc[28cdcec723180595]::visit::DocVisitor>::visit_inner_recur
  23:     0x55f1737c35e0 - <rustdoc[28cdcec723180595]::passes::collect_intra_doc_links::LinkCollector as rustdoc[28cdcec723180595]::visit::DocVisitor>::visit_inner_recur
  24:     0x55f1736a8ee6 - rustdoc[28cdcec723180595]::core::run_global_ctxt
  25:     0x55f1737ce594 - rustdoc[28cdcec723180595]::main_args::{closure#2}::{closure#0}
  26:     0x55f17353bcc5 - rustc_interface[2be5b1ee59d03666]::interface::run_compiler::<(), rustdoc[28cdcec723180595]::main_args::{closure#2}>::{closure#1}
  27:     0x55f1734bacbf - std[d6740322a10ebed4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[2be5b1ee59d03666]::util::run_in_thread_with_globals<rustc_interface[2be5b1ee59d03666]::util::run_in_thread_pool_with_globals<rustc_interface[2be5b1ee59d03666]::interface::run_compiler<(), rustdoc[28cdcec723180595]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  28:     0x55f17354d40d - <<std[d6740322a10ebed4]::thread::Builder>::spawn_unchecked_<rustc_interface[2be5b1ee59d03666]::util::run_in_thread_with_globals<rustc_interface[2be5b1ee59d03666]::util::run_in_thread_pool_with_globals<rustc_interface[2be5b1ee59d03666]::interface::run_compiler<(), rustdoc[28cdcec723180595]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b19db243f5c50a85]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  29:     0x7ff252ce47eb - std::sys::pal::unix::thread::Thread::new::thread_start::h3b47e04df2d496e5
  30:     0x7ff24ca561f5 - start_thread
                               at ./nptl/pthread_create.c:442:8
  31:     0x7ff24cad689c - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81:0
  32:                0x0 - <unknown>

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md

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

note: please attach the file at `/home/tuxmain/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy-0.15.3/rustc-ice-2025-04-21T12_08_31-77376.txt` to your bug report

note: compiler flags: --crate-type lib

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

query stack during panic:
end of query stack
error: could not document `bevy`
Backtrace

thread 'rustc' panicked at compiler/rustc_middle/src/ty/assoc.rs:253:9:
assertion failed: !name.is_empty()
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <rustc_middle::ty::assoc::AssocItems>::filter_by_name_unhygienic.cold
   4: rustdoc::passes::collect_intra_doc_links::filter_assoc_items_by_name_and_namespace
   5: <core::iter::adapters::map::Map<core::iter::adapters::flatten::FlatMap<core::slice::iter::Iter<rustc_span::def_id::DefId>, core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::map_while::MapWhile<core::slice::iter::Iter<u32>, <rustc_data_structures::sorted_map::index_map::SortedIndexMultiMap<u32, core::option::Option<rustc_span::symbol::Symbol>, rustc_middle::ty::assoc::AssocItem>>::get_by_key_enumerated::{closure#1}>, <rustc_data_structures::sorted_map::index_map::SortedIndexMultiMap<u32, core::option::Option<rustc_span::symbol::Symbol>, rustc_middle::ty::assoc::AssocItem>>::get_by_key::{closure#0}>, rustdoc::passes::collect_intra_doc_links::filter_assoc_items_by_name_and_namespace::{closure#0}>, <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item::{closure#2}>, <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item::{closure#3}> as core::iter::traits::iterator::Iterator>::next
   6: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
   7: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve
   8: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_link
   9: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_links
  10: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  11: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  12: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  13: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  14: rustdoc::core::run_global_ctxt
  15: rustdoc::main_args::{closure#2}::{closure#0}
  16: rustc_interface::interface::run_compiler::<(), rustdoc::main_args::{closure#2}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

rustc-ice-2025-04-21T12_08_31-77376.txt

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-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions