Skip to content

[ICE]: rustdoc: Handle macros with multiple kinds #156485

@matthiaskrgr

Description

@matthiaskrgr

Code

#![feature(macro_derive)]
macro_rules !my_macro {
  derive()() =>{};
  () => {}
}

Meta

rustc --version --verbose:

rustdoc 1.97.0-nightly (64a965e90 2026-05-11)
binary: rustdoc
commit-hash: 64a965e9013a9d14e83c4d370af26f6be6bf96fb
commit-date: 2026-05-11
host: x86_64-unknown-linux-gnu
release: 1.97.0-nightly
LLVM version: 22.1.4

Error output

<output>
Backtrace

thread 'rustc' (3549819) panicked at src/librustdoc/clean/mod.rs:2949:41:
not yet implemented: Handle macros with multiple kinds
stack backtrace:
   0:     0x7f447d697ee9 - <<std[89f22c552bc5066a]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[8ad6c24798842d79]::fmt::Display>::fmt
   1:     0x7f447de1b108 - core[8ad6c24798842d79]::fmt::write
   2:     0x7f447d6aeb06 - <std[89f22c552bc5066a]::sys::stdio::unix::Stderr as std[89f22c552bc5066a]::io::Write>::write_fmt
   3:     0x7f447d66df2e - std[89f22c552bc5066a]::panicking::default_hook::{closure#0}
   4:     0x7f447d68b5a3 - std[89f22c552bc5066a]::panicking::default_hook
   5:     0x7f447c56c511 - std[89f22c552bc5066a]::panicking::update_hook::<alloc[eb280b9ba06e18cf]::boxed::Box<rustc_driver_impl[234634a74b90a67c]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f447d68b882 - std[89f22c552bc5066a]::panicking::panic_with_hook
   7:     0x7f447d66e024 - std[89f22c552bc5066a]::panicking::panic_handler::{closure#0}
   8:     0x7f447d664cf9 - std[89f22c552bc5066a]::sys::backtrace::__rust_end_short_backtrace::<std[89f22c552bc5066a]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f447d66fa5d - __rustc[75ff3fde40943ffb]::rust_begin_unwind
  10:     0x7f447a8fc16c - core[8ad6c24798842d79]::panicking::panic_fmt
  11:     0x563850aba16e - rustdoc[d2f483044280a0b2]::clean::clean_maybe_renamed_item::{closure#0}
  12:     0x563850b90da0 - rustdoc[d2f483044280a0b2]::clean::clean_doc_module
  13:     0x563850b82cd1 - rustdoc[d2f483044280a0b2]::core::run_global_ctxt
  14:     0x563850a9d371 - rustdoc[d2f483044280a0b2]::main_args::{closure#2}::{closure#0}
  15:     0x563850a95b2e - rustc_interface[e735d0cf28bd6984]::interface::run_compiler::<(), rustdoc[d2f483044280a0b2]::main_args::{closure#2}>::{closure#1}
  16:     0x5638509cc0e6 - std[89f22c552bc5066a]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e735d0cf28bd6984]::util::run_in_thread_with_globals<rustc_interface[e735d0cf28bd6984]::util::run_in_thread_pool_with_globals<rustc_interface[e735d0cf28bd6984]::interface::run_compiler<(), rustdoc[d2f483044280a0b2]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  17:     0x563850adaecd - <std[89f22c552bc5066a]::thread::lifecycle::spawn_unchecked<rustc_interface[e735d0cf28bd6984]::util::run_in_thread_with_globals<rustc_interface[e735d0cf28bd6984]::util::run_in_thread_pool_with_globals<rustc_interface[e735d0cf28bd6984]::interface::run_compiler<(), rustdoc[d2f483044280a0b2]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[8ad6c24798842d79]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  18:     0x7f447ef3ba2c - <std[89f22c552bc5066a]::sys::thread::unix::Thread>::new::thread_start
  19:     0x7f447869697a - <unknown>
  20:     0x7f447871a2bc - <unknown>
  21:                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/matthias/vcs/github/CRED/rustc-ice-2026-05-12T05_42_16-3549810.txt` to your bug report

note: rustc 1.97.0-nightly (64a965e90 2026-05-11) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type
    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