Skip to content

[ICE]: no resolutions for a doc link #157326

@matthiaskrgr

Description

@matthiaskrgr

Code

#![deprecated(note = "use [Env::try_invoke] instead")]
//! ```
fn main() {}

Meta

rustc --version --verbose:

rustdoc 1.98.0-nightly (48f976c71 2026-06-02)
binary: rustdoc
commit-hash: 48f976c7131e76b6a1ba6ba316c90d97ffdfe184
commit-date: 2026-06-02
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6

Error output

<output>
Backtrace

error: internal compiler error: /rustc-dev/48f976c7131e76b6a1ba6ba316c90d97ffdfe184/compiler/rustc_metadata/src/rmeta/encoder.rs:2583:36: no resolutions for a doc link
 --> code.rs:1:1
  |
1 | / #![deprecated(note = "use [Env::try_invoke] instead")]
2 | | //! ```
3 | | fn main() {}
  | |____________^


thread 'rustc' (106122) panicked at /rustc-dev/48f976c7131e76b6a1ba6ba316c90d97ffdfe184/compiler/rustc_metadata/src/rmeta/encoder.rs:2583:36:
Box<dyn Any>
stack backtrace:
   0:     0x7f4b58093229 - <<std[fe76cef823db78b8]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[38de1a44b5724aef]::fmt::Display>::fmt
   1:     0x7f4b5882a948 - core[38de1a44b5724aef]::fmt::write
   2:     0x7f4b580a9d26 - <std[fe76cef823db78b8]::sys::stdio::unix::Stderr as std[fe76cef823db78b8]::io::Write>::write_fmt
   3:     0x7f4b5806945e - std[fe76cef823db78b8]::panicking::default_hook::{closure#0}
   4:     0x7f4b58086b63 - std[fe76cef823db78b8]::panicking::default_hook
   5:     0x7f4b56e74d11 - std[fe76cef823db78b8]::panicking::update_hook::<alloc[be59e781f80d7f2c]::boxed::Box<rustc_driver_impl[c029390604556a06]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f4b58086e42 - std[fe76cef823db78b8]::panicking::panic_with_hook
   7:     0x7f4b56ea24c1 - std[fe76cef823db78b8]::panicking::begin_panic::<rustc_errors[6ede93a86848325d]::ExplicitBug>::{closure#0}
   8:     0x7f4b56e9b4b6 - std[fe76cef823db78b8]::sys::backtrace::__rust_end_short_backtrace::<std[fe76cef823db78b8]::panicking::begin_panic<rustc_errors[6ede93a86848325d]::ExplicitBug>::{closure#0}, !>
   9:     0x7f4b56e9b21b - std[fe76cef823db78b8]::panicking::begin_panic::<rustc_errors[6ede93a86848325d]::ExplicitBug>
  10:     0x7f4b56ead9b1 - <rustc_errors[6ede93a86848325d]::diagnostic::BugAbort as rustc_errors[6ede93a86848325d]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  11:     0x7f4b575149cc - <rustc_errors[6ede93a86848325d]::DiagCtxtHandle>::span_bug::<rustc_span[8b394218ed00ed4b]::span_encoding::Span, alloc[be59e781f80d7f2c]::string::String>
  12:     0x7f4b57540066 - rustc_middle[e260e0ea5b5fb938]::util::bug::opt_span_bug_fmt::<rustc_span[8b394218ed00ed4b]::span_encoding::Span>::{closure#0}
  13:     0x7f4b575401f2 - rustc_middle[e260e0ea5b5fb938]::ty::context::tls::with_opt::<rustc_middle[e260e0ea5b5fb938]::util::bug::opt_span_bug_fmt<rustc_span[8b394218ed00ed4b]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7f4b5752ed8b - rustc_middle[e260e0ea5b5fb938]::ty::context::tls::with_context_opt::<rustc_middle[e260e0ea5b5fb938]::ty::context::tls::with_opt<rustc_middle[e260e0ea5b5fb938]::util::bug::opt_span_bug_fmt<rustc_span[8b394218ed00ed4b]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7f4b553f8628 - rustc_middle[e260e0ea5b5fb938]::util::bug::span_bug_fmt::<rustc_span[8b394218ed00ed4b]::span_encoding::Span>
  16:     0x7f4b5751029b - <rustc_metadata[7469b0438cfc583c]::rmeta::encoder::provide::{closure#0} as core[38de1a44b5724aef]::ops::function::FnOnce<(rustc_middle[e260e0ea5b5fb938]::ty::context::TyCtxt, rustc_span[8b394218ed00ed4b]::def_id::LocalDefId)>>::call_once
  17:     0x7f4b57a70703 - rustc_query_impl[7fca90738b1b6ced]::query_impl::doc_link_resolutions::invoke_provider_fn::__rust_begin_short_backtrace
  18:     0x7f4b5881978d - rustc_query_impl[7fca90738b1b6ced]::execution::try_execute_query::<rustc_middle[e260e0ea5b5fb938]::query::caches::DefIdCache<rustc_middle[e260e0ea5b5fb938]::query::erase::ErasedData<[u8; 8usize]>>, false>
  19:     0x7f4b57a70772 - rustc_query_impl[7fca90738b1b6ced]::query_impl::doc_link_resolutions::execute_query_non_incr::__rust_end_short_backtrace
  20:     0x55eafd24554e - <rustdoc[ce32bf26982ab38b]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  21:     0x55eafd246160 - <rustdoc[ce32bf26982ab38b]::passes::collect_intra_doc_links::LinkCollector>::resolve
  22:     0x55eafd25eedb - <rustdoc[ce32bf26982ab38b]::passes::collect_intra_doc_links::LinkCollector>::resolve_link
  23:     0x55eafd1b73f6 - <rustdoc[ce32bf26982ab38b]::passes::collect_intra_doc_links::LinkCollector>::resolve_links::{closure#1}
  24:     0x55eafd3a81ab - <rustdoc[ce32bf26982ab38b]::passes::collect_intra_doc_links::LinkCollector as rustdoc[ce32bf26982ab38b]::visit::DocVisitor>::visit_item
  25:     0x55eafd290ef6 - rustdoc[ce32bf26982ab38b]::core::run_global_ctxt
  26:     0x55eafd1a4bc1 - rustdoc[ce32bf26982ab38b]::main_args::{closure#2}::{closure#0}
  27:     0x55eafd19c477 - rustc_interface[d8ae4d45919bdbd0]::interface::run_compiler::<(), rustdoc[ce32bf26982ab38b]::main_args::{closure#2}>::{closure#1}
  28:     0x55eafd0cab36 - std[fe76cef823db78b8]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[d8ae4d45919bdbd0]::util::run_in_thread_with_globals<rustc_interface[d8ae4d45919bdbd0]::util::run_in_thread_pool_with_globals<rustc_interface[d8ae4d45919bdbd0]::interface::run_compiler<(), rustdoc[ce32bf26982ab38b]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  29:     0x55eafd1e3b1d - <std[fe76cef823db78b8]::thread::lifecycle::spawn_unchecked<rustc_interface[d8ae4d45919bdbd0]::util::run_in_thread_with_globals<rustc_interface[d8ae4d45919bdbd0]::util::run_in_thread_pool_with_globals<rustc_interface[d8ae4d45919bdbd0]::interface::run_compiler<(), rustdoc[ce32bf26982ab38b]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[38de1a44b5724aef]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:     0x7f4b599875ec - <std[fe76cef823db78b8]::sys::thread::unix::Thread>::new::thread_start
  31:     0x7f4b52e981b9 - <unknown>
  32:     0x7f4b52f1d21c - <unknown>
  33:                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-06-02T18_54_39-106121.txt` to your bug report

note: rustc 1.98.0-nightly (48f976c71 2026-06-02) 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-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-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