Repository navigation
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️L-deprecatedLint: deprecatedT-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.
Description
I tried this code:
rustdoc code.rs --document-private-items
mod my_mod {
#![deprecated(note = "use [Env::try_invoke] instead")]
}I expected to see this happen: explanation
Instead, this happened: explanation
Meta
rustc --version --verbose:
rustdoc 1.101.0-nightly (6a5867791 2026-10-21)
binary: rustdoc
commit-hash: 6a58677913ae3e443146503de3933abef0b2eda3
commit-date: 2026-10-21
host: x86_64-unknown-linux-gnu
release: 1.101.0-nightly
LLVM version: 23.1.4
Backtrace
error: internal compiler error: /rustc-dev/6a58677913ae3e443146503de3933abef0b2eda3/compiler/rustc_metadata/src/rmeta/encoder.rs:2852:36: no resolutions for a doc link
--> code.rs:1:1
|
1 | mod my_mod {
| ^^^^^^^^^^
thread 'rustc' (1599218) panicked at /rustc-dev/6a58677913ae3e443146503de3933abef0b2eda3/compiler/rustc_metadata/src/rmeta/encoder.rs:2852:36:
Box<dyn Any>
stack backtrace:
0: 0x7f9ea5435d06 - <<std[1f6b3a9ea148cec3]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[2bf2e23422e011d6]::fmt::Display>::fmt
1: 0x7f9ea5a10229 - core[2bf2e23422e011d6]::fmt::write
2: 0x7f9ea38a7afc - <std[1f6b3a9ea148cec3]::sys::stdio::unix::Stderr as core[2bf2e23422e011d6]::io::write::Write>::write_fmt
3: 0x7f9ea540691a - std[1f6b3a9ea148cec3]::panicking::default_hook::{closure#0}
4: 0x7f9ea5429685 - std[1f6b3a9ea148cec3]::panicking::default_hook
5: 0x7f9ea41da699 - std[1f6b3a9ea148cec3]::panicking::update_hook::<alloc[5645411e76b143ac]::boxed::Box<rustc_driver_impl[37fa416bae49915b]::install_ice_hook::{closure#1}>>::{closure#0}
6: 0x7f9ea5429b22 - std[1f6b3a9ea148cec3]::panicking::panic_with_hook
7: 0x7f9ea4fca327 - std[1f6b3a9ea148cec3]::panicking::begin_panic::<rustc_span[7b78d676467798c1]::macros::ExplicitBug>::{closure#0}
8: 0x7f9ea4fc834e - std[1f6b3a9ea148cec3]::sys::backtrace::__rust_end_short_backtrace::<std[1f6b3a9ea148cec3]::panicking::begin_panic<rustc_span[7b78d676467798c1]::macros::ExplicitBug>::{closure#0}, !>
9: 0x7f9ea4fc79db - std[1f6b3a9ea148cec3]::panicking::begin_panic::<rustc_span[7b78d676467798c1]::macros::ExplicitBug>
10: 0x7f9ea146d481 - rustc_span[7b78d676467798c1]::macros::bug_impl
11: 0x7f9ea4841caf - <rustc_metadata[a0956d3ce04ec31d]::rmeta::encoder::provide::{closure#0} as core[2bf2e23422e011d6]::ops::function::FnOnce<(rustc_middle[168ba58a68796d5b]::ty::context::TyCtxt, rustc_span[7b78d676467798c1]::def_id::LocalModId)>>::call_once
12: 0x7f9ea4e3dfa3 - rustc_query_impl[cf2f7d76c691799]::query_vtables::doc_link_resolutions::invoke_provider_fn::__rust_begin_short_backtrace
13: 0x7f9ea4db33ce - rustc_query_impl[cf2f7d76c691799]::execution::try_execute_query::<rustc_middle[168ba58a68796d5b]::query::caches::DefaultCache<rustc_span[7b78d676467798c1]::def_id::ModId, rustc_middle[168ba58a68796d5b]::query::erase::ErasedData<[u8; 8usize]>>, false>
14: 0x7f9ea4e3dfda - rustc_query_impl[cf2f7d76c691799]::query_vtables::doc_link_resolutions::execute_query_non_incr::__rust_end_short_backtrace
15: 0x5594ea0674ae - <rustdoc[60ec855eea93817f]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
16: 0x5594ea065ac8 - <rustdoc[60ec855eea93817f]::passes::collect_intra_doc_links::LinkCollector>::resolve
17: 0x5594ea062120 - <rustdoc[60ec855eea93817f]::passes::collect_intra_doc_links::LinkCollector>::resolve_link
18: 0x5594ea053534 - <rustdoc[60ec855eea93817f]::passes::collect_intra_doc_links::LinkCollector>::resolve_links::{closure#1}
19: 0x5594ea04fb7e - <rustdoc[60ec855eea93817f]::passes::collect_intra_doc_links::LinkCollector>::resolve_links::{closure#2}
20: 0x5594ea04f520 - <rustdoc[60ec855eea93817f]::passes::collect_intra_doc_links::LinkCollector as rustdoc[60ec855eea93817f]::visit::DocVisitor>::visit_item
21: 0x5594ea04f071 - <rustdoc[60ec855eea93817f]::passes::collect_intra_doc_links::LinkCollector as rustdoc[60ec855eea93817f]::visit::DocVisitor>::visit_item
22: 0x5594ea042ef1 - rustdoc[60ec855eea93817f]::core::run_global_ctxt
23: 0x5594ea121e3b - rustdoc[60ec855eea93817f]::main_args::{closure#2}::{closure#0}
24: 0x5594ea12fe5d - rustc_interface[e430d4a3895474e2]::interface::run_compiler::<(), rustdoc[60ec855eea93817f]::main_args::{closure#2}>::{closure#2}
25: 0x5594ea12da7f - std[1f6b3a9ea148cec3]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e430d4a3895474e2]::util::run_in_thread_with_globals<rustc_interface[e430d4a3895474e2]::util::run_in_thread_pool_with_globals<rustc_interface[e430d4a3895474e2]::interface::run_compiler<(), rustdoc[60ec855eea93817f]::main_args::{closure#2}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
26: 0x5594ea12d7df - <std[1f6b3a9ea148cec3]::thread::lifecycle::spawn_unchecked<rustc_interface[e430d4a3895474e2]::util::run_in_thread_with_globals<rustc_interface[e430d4a3895474e2]::util::run_in_thread_pool_with_globals<rustc_interface[e430d4a3895474e2]::interface::run_compiler<(), rustdoc[60ec855eea93817f]::main_args::{closure#2}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[2bf2e23422e011d6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
27: 0x7f9ea6d6802d - <std[1f6b3a9ea148cec3]::sys::thread::unix::Thread>::new::thread_start
28: 0x7f9e9fc980a2 - <unknown>
29: 0x7f9e9fd2080c - <unknown>
30: 0x0 - <unknown>
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-10-21T20_18_25-1599217.txt` to your bug report
note: rustc 1.101.0-nightly (6a5867791 2026-10-21) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [doc_link_resolutions] resolutions for documentation links for a module
end of query stack
error: aborting due to 1 previous error
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️L-deprecatedLint: deprecatedT-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.
Activity
matthiaskrgr commentedon Oct 21, 2026
This passed on todays nightly but will ICE on tomorrows nightly.
I have not run the bisection but I would guess that the fix for #164459 ( #164594 ) caused this 😅
cc @GuillaumeGomez
GuillaumeGomez commentedon Oct 21, 2026
You don't need
--document-private-itemsbtw, just make the module public.GuillaumeGomez commentedon Oct 21, 2026
Gonna take a look at it tomorrow.
Rollup merge of rust-lang#164733 - GuillaumeGomez:deprecated-doc-reso…
Rollup merge of rust-lang#164733 - GuillaumeGomez:deprecated-doc-reso…
Rollup merge of rust-lang#164733 - GuillaumeGomez:deprecated-doc-reso…
Rollup merge of rust-lang#164733 - GuillaumeGomez:deprecated-doc-reso…
Unrolled build for #164733 in rollup 164782