Skip to content

ICE: panicked at 'no entry found for key' documenting std::i8 re-export with --document-private-items #95633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jdm opened this issue Apr 4, 2022 · 2 comments · Fixed by #95645
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jdm
Copy link
Contributor

jdm commented Apr 4, 2022

Code

mod stdlib {
    pub (crate) use std::i8;
}

fn main() {}

Meta

The ICE appears with cargo +beta doc --document-private-items and cargo +nightly doc --document-private-items, but not cargo +stable doc --document-private-items.

Beta:

rustc 1.60.0-beta.7 (edbed409a 2022-03-31)
binary: rustc
commit-hash: edbed409aaed33aa949e7044fbf39c366b0af92b
commit-date: 2022-03-31
host: x86_64-apple-darwin
release: 1.60.0-beta.7
LLVM version: 14.0.0

Error output

 Documenting rustdocpanic v0.1.0 (/private/tmp/rustdocpanic)
thread 'rustc' panicked at 'no entry found for key', src/librustdoc/passes/collect_intra_doc_links.rs:916:16
stack backtrace:
   0:        0x10cbbd852 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h58e1337ad9835f56
   1:        0x10cc137db - core::fmt::write::hd2abb52172e8b3c0
   2:        0x10cbaeb1e - std::io::Write::write_fmt::h8bfa1795772fbb26
   3:        0x10cbc1bc0 - std::panicking::default_hook::{{closure}}::h95d8e66b57e1287f
   4:        0x10cbc18a6 - std::panicking::default_hook::h84259742132acbae
   5:        0x10ebc945a - rustc_driver[2f5bedf916539d68]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x10cbc248b - std::panicking::rust_panic_with_hook::h466d2a94dc3e865a
   7:        0x10cbc2173 - std::panicking::begin_panic_handler::{{closure}}::h41f582365822a951
   8:        0x10cbbdce7 - std::sys_common::backtrace::__rust_end_short_backtrace::h547d28823845e583
   9:        0x10cbc1e3a - _rust_begin_unwind
  10:        0x10cc3c963 - core::panicking::panic_fmt::h09e1dfdf44a0ee45
  11:        0x10cc1031b - core::panicking::panic_display::ha116a3fa6fc25f3f
  12:        0x10cc102cc - core::panicking::panic_str::h2217b1c05cb64c94
  13:        0x10cc3c7f9 - core::option::expect_failed::h467bab87b93cb38d
  14:        0x10bedcc72 - rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::resolve_associated_trait_item
  15:        0x10beda4ff - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
  16:        0x10bed8cb4 - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector>::resolve
  17:        0x10bee28a8 - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector>::resolve_link
  18:        0x10bede190 - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f00894b83031c0b6]::visit::DocVisitor>::visit_item
  19:        0x10beeaaec - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f00894b83031c0b6]::visit::DocVisitor>::visit_inner_recur
  20:        0x10bede4f9 - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f00894b83031c0b6]::visit::DocVisitor>::visit_item
  21:        0x10beeaaec - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f00894b83031c0b6]::visit::DocVisitor>::visit_inner_recur
  22:        0x10bede4f9 - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f00894b83031c0b6]::visit::DocVisitor>::visit_item
  23:        0x10beeaaec - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f00894b83031c0b6]::visit::DocVisitor>::visit_inner_recur
  24:        0x10bede4f9 - <rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f00894b83031c0b6]::visit::DocVisitor>::visit_item
  25:        0x10bed77de - rustdoc[f00894b83031c0b6]::passes::collect_intra_doc_links::collect_intra_doc_links
  26:        0x10c0ac89c - <rustc_session[bfb82a2fb5a4229f]::session::Session>::time::<rustdoc[f00894b83031c0b6]::clean::types::Crate, rustdoc[f00894b83031c0b6]::core::run_global_ctxt::{closure#8}>
  27:        0x10bf88eec - rustdoc[f00894b83031c0b6]::core::run_global_ctxt
  28:        0x10c0acc82 - <rustc_session[bfb82a2fb5a4229f]::session::Session>::time::<(rustdoc[f00894b83031c0b6]::clean::types::Crate, rustdoc[f00894b83031c0b6]::config::RenderOptions, rustdoc[f00894b83031c0b6]::formats::cache::Cache), rustdoc[f00894b83031c0b6]::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#0}>
  29:        0x10bfaf73e - <rustc_interface[53028ea1f8c6fee1]::passes::QueryContext>::enter::<rustdoc[f00894b83031c0b6]::main_options::{closure#0}::{closure#0}::{closure#1}, core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>>
  30:        0x10bf1f488 - <rustc_interface[53028ea1f8c6fee1]::interface::Compiler>::enter::<rustdoc[f00894b83031c0b6]::main_options::{closure#0}::{closure#0}, core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>>
  31:        0x10bf7cb82 - rustc_span[84a185776d0dd2fc]::with_source_map::<core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>, rustc_interface[53028ea1f8c6fee1]::interface::create_compiler_and_run<core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>, rustdoc[f00894b83031c0b6]::main_options::{closure#0}>::{closure#1}>
  32:        0x10bf0e2e4 - rustc_interface[53028ea1f8c6fee1]::interface::create_compiler_and_run::<core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>, rustdoc[f00894b83031c0b6]::main_options::{closure#0}>
  33:        0x10c056fe2 - rustdoc[f00894b83031c0b6]::main_options
  34:        0x10beebab8 - std[6ac955e25965e5b3]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[53028ea1f8c6fee1]::util::run_in_thread_pool_with_globals<rustdoc[f00894b83031c0b6]::main_args::{closure#0}, core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>>::{closure#0}, core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>>
  35:        0x10c0aa531 - <<std[6ac955e25965e5b3]::thread::Builder>::spawn_unchecked_<rustc_interface[53028ea1f8c6fee1]::util::run_in_thread_pool_with_globals<rustdoc[f00894b83031c0b6]::main_args::{closure#0}, core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>>::{closure#0}, core[37e76a7b93df2974]::result::Result<(), rustc_errors[162dcd24c6b4dc19]::ErrorReported>>::{closure#1} as core[37e76a7b93df2974]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  36:        0x10cbcfbd7 - std::sys::unix::thread::Thread::new::thread_start::h4e86ff58bd47d950
  37:     0x7fff6ab9f109 - __pthread_start

error: internal compiler error: unexpected panic

note: 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-compiler&template=ice.md

note: rustc 1.60.0-beta.7 (edbed409a 2022-03-31) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin

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

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

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type bin --crate-name rustdocpanic src/main.rs -o /private/tmp/rustdocpanic/target/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --document-private-items -C metadata=1032053576d894a5 -L dependency=/private/tmp/rustdocpanic/target/debug/deps --crate-version 0.1.0` (exit status: 101)
Backtrace

 Documenting rustdocpanic v0.1.0 (/private/tmp/rustdocpanic)
thread 'rustc' panicked at 'no entry found for key', src/librustdoc/passes/collect_intra_doc_links.rs:916:16
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_display
   3: core::panicking::panic_str
   4: core::option::expect_failed
   5: rustdoc::passes::collect_intra_doc_links::resolve_associated_trait_item
   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 as rustdoc::visit::DocVisitor>::visit_item
  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_item
  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_item
  14: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  15: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  16: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
  17: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::core::run_global_ctxt::{closure#8}>
  18: rustdoc::core::run_global_ctxt
  19: <rustc_session::session::Session>::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache), rustdoc::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#0}>
  20: <rustc_interface::passes::QueryContext>::enter::<rustdoc::main_options::{closure#0}::{closure#0}::{closure#1}, core::result::Result<(), rustc_errors::ErrorReported>>
  21: <rustc_interface::interface::Compiler>::enter::<rustdoc::main_options::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
  22: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustdoc::main_options::{closure#0}>::{closure#1}>
  23: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorReported>, rustdoc::main_options::{closure#0}>
  24: rustdoc::main_options
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: 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-compiler&template=ice.md

note: rustc 1.60.0-beta.7 (edbed409a 2022-03-31) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin

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

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

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type bin --crate-name rustdocpanic src/main.rs -o /private/tmp/rustdocpanic/target/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --document-private-items -C metadata=1032053576d894a5 -L dependency=/private/tmp/rustdocpanic/target/debug/deps --crate-version 0.1.0` (exit status: 101)

@jdm jdm added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. C-bug Category: This is a bug. labels Apr 4, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 4, 2022
@pietroalbini
Copy link
Member

@rust-lang/rustdoc this is a regression affecting the release that is being prepared today.

@GuillaumeGomez
Copy link
Member

I'll take a look.

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 5, 2022
…raits-in-scope-primitive, r=jyn514

Fix intra doc link ICE when trying to get traits in scope for primitive

Fixes rust-lang#95633.

I think `@notriddle` was the one who worked on this part of the code last so:

r? `@notriddle`
@bors bors closed this as completed in bf44a87 Apr 5, 2022
bors-servo added a commit to servo/servo that referenced this issue Apr 6, 2022
Update nightly rustc.

This brings in the fix for rust-lang/rust#95633 which should unbreak our documentation builds.
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants