Skip to content
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

rustdoc ICE: 'no entry found for key' with static referencing external type #93698

Closed
Nemo157 opened this issue Feb 6, 2022 · 4 comments · Fixed by #93766
Closed

rustdoc ICE: 'no entry found for key' with static referencing external type #93698

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

Comments

@Nemo157
Copy link
Member

Nemo157 commented Feb 6, 2022

Code

(Using once-cell 1.9.0 + rtsp-types 0.0.3)

use once_cell::sync::Lazy;

pub static X_ACCEPT_DYNAMIC_RATE: Lazy<rtsp_types::HeaderName> = Lazy::new(|| unimplemented!());

(Minimized from https://docs.rs/crate/retina/0.3.7/builds/505117)

Meta

rustdoc --version --verbose:

rustdoc 1.60.0-nightly (88fb06a1f 2022-02-05)
binary: rustdoc
commit-hash: 88fb06a1f331926bccb448acdb52966fd1ec8a92
commit-date: 2022-02-05
host: x86_64-unknown-linux-gnu
release: 1.60.0-nightly
LLVM version: 13.0.0

Error output

thread 'rustc' panicked at 'no entry found for key', src/librustdoc/passes/collect_intra_doc_links.rs:930:16
Backtrace

stack backtrace:
   0:     0x7fee9c596eec - std::backtrace_rs::backtrace::libunwind::trace::h4e07a075fb307146
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fee9c596eec - std::backtrace_rs::backtrace::trace_unsynchronized::h7146d02e03bd4445
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fee9c596eec - std::sys_common::backtrace::_print_fmt::hed37bd9bd93d6e87
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fee9c596eec - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc65ee421235365f6
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fee9c5f830c - core::fmt::write::h7540d701e0e7b611
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/core/src/fmt/mod.rs:1190:17
   5:     0x7fee9c5864b3 - std::io::Write::write_fmt::he85d59007229d21e
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/io/mod.rs:1653:15
   6:     0x7fee9c59b1b1 - std::sys_common::backtrace::_print::h189d4c5dca2e9227
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fee9c59b1b1 - std::sys_common::backtrace::print::h43b5a444ea1c9ef8
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fee9c59b1b1 - std::panicking::default_hook::{{closure}}::h97b2485ff497cc81
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/panicking.rs:295:22
   9:     0x7fee9c59ae6f - std::panicking::default_hook::ha4999322f320645f
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/panicking.rs:314:9
  10:     0x7fee9cd781c1 - rustc_driver[7270c8b4a3c628ab]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fee9c59ba8b - std::panicking::rust_panic_with_hook::h3c44292d2b9e7acd
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/panicking.rs:702:17
  12:     0x7fee9c59b747 - std::panicking::begin_panic_handler::{{closure}}::h291eeb37fb673a2b
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/panicking.rs:588:13
  13:     0x7fee9c597394 - std::sys_common::backtrace::__rust_end_short_backtrace::hcd22a174748dc4e6
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7fee9c59b459 - rust_begin_unwind
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/panicking.rs:584:5
  15:     0x7fee9c5629c3 - core::panicking::panic_fmt::hbc44f6fe2c852856
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/core/src/panicking.rs:135:14
  16:     0x7fee9c5f5101 - core::panicking::panic_display::hfbe3bf52dabded56
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/core/src/panicking.rs:65:5
  17:     0x7fee9c5f50ab - core::panicking::panic_str::h019294c7e10fafca
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/core/src/panicking.rs:56:5
  18:     0x7fee9c562846 - core::option::expect_failed::hc0b9bb2addf13335
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/core/src/option.rs:1840:5
  19:     0x55a76c656ba9 - rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::resolve_associated_trait_item
  20:     0x55a76c6549a3 - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
  21:     0x55a76c652bdf - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector>::resolve
  22:     0x55a76c65c917 - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector>::resolve_link
  23:     0x55a76c6581a7 - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector as rustdoc[7da2c6ffeb538287]::visit::DocVisitor>::visit_item
  24:     0x55a76c664cda - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector as rustdoc[7da2c6ffeb538287]::visit::DocVisitor>::visit_inner_recur
  25:     0x55a76c6587dd - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector as rustdoc[7da2c6ffeb538287]::visit::DocVisitor>::visit_item
  26:     0x55a76c664c5a - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector as rustdoc[7da2c6ffeb538287]::visit::DocVisitor>::visit_inner_recur
  27:     0x55a76c6587e7 - <rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::LinkCollector as rustdoc[7da2c6ffeb538287]::visit::DocVisitor>::visit_item
  28:     0x55a76c6514ef - rustdoc[7da2c6ffeb538287]::passes::collect_intra_doc_links::collect_intra_doc_links
  29:     0x55a76c4f6714 - <rustc_session[549e7edeac90651a]::session::Session>::time::<rustdoc[7da2c6ffeb538287]::clean::types::Crate, rustdoc[7da2c6ffeb538287]::core::run_global_ctxt::{closure#8}>
  30:     0x55a76c6fb69d - rustdoc[7da2c6ffeb538287]::core::run_global_ctxt
  31:     0x55a76c4f6b92 - <rustc_session[549e7edeac90651a]::session::Session>::time::<(rustdoc[7da2c6ffeb538287]::clean::types::Crate, rustdoc[7da2c6ffeb538287]::config::RenderOptions, rustdoc[7da2c6ffeb538287]::formats::cache::Cache), rustdoc[7da2c6ffeb538287]::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#0}>
  32:     0x55a76c686080 - <rustc_interface[e65143b54da81d65]::passes::QueryContext>::enter::<rustdoc[7da2c6ffeb538287]::main_options::{closure#0}::{closure#0}::{closure#1}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>
  33:     0x55a76c63bedc - <rustc_interface[e65143b54da81d65]::interface::Compiler>::enter::<rustdoc[7da2c6ffeb538287]::main_options::{closure#0}::{closure#0}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>
  34:     0x55a76c721e8c - rustc_span[15f94c6d1293c067]::with_source_map::<core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>, rustc_interface[e65143b54da81d65]::interface::create_compiler_and_run<core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>, rustdoc[7da2c6ffeb538287]::main_options::{closure#0}>::{closure#1}>
  35:     0x55a76c63b307 - rustc_interface[e65143b54da81d65]::interface::create_compiler_and_run::<core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>, rustdoc[7da2c6ffeb538287]::main_options::{closure#0}>
  36:     0x55a76c4dbf7e - rustdoc[7da2c6ffeb538287]::main_options
  37:     0x55a76c4f436d - <scoped_tls[fb3699245f7305b6]::ScopedKey<rustc_span[15f94c6d1293c067]::SessionGlobals>>::set::<rustc_interface[e65143b54da81d65]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustdoc[7da2c6ffeb538287]::main_args::{closure#0}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>::{closure#0}::{closure#0}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>
  38:     0x55a76c666359 - std[50ccddad40ab0dbc]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e65143b54da81d65]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustdoc[7da2c6ffeb538287]::main_args::{closure#0}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>::{closure#0}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>
  39:     0x55a76c4f3f09 - <<std[50ccddad40ab0dbc]::thread::Builder>::spawn_unchecked_<rustc_interface[e65143b54da81d65]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustdoc[7da2c6ffeb538287]::main_args::{closure#0}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>::{closure#0}, core[e1f4b737aac348dc]::result::Result<(), rustc_errors[f00c7d54031fa194]::ErrorReported>>::{closure#1} as core[e1f4b737aac348dc]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  40:     0x7fee9c5a7833 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h300bddae656f1f54
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/alloc/src/boxed.rs:1854:9
  41:     0x7fee9c5a7833 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4b4a2f742a05b1b1
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/alloc/src/boxed.rs:1854:9
  42:     0x7fee9c5a7833 - std::sys::unix::thread::Thread::new::thread_start::ha924d1707de9fad4
                               at /rustc/88fb06a1f331926bccb448acdb52966fd1ec8a92/library/std/src/sys/unix/thread.rs:108:17
  43:     0x7fee9c4d3259 - start_thread
  44:     0x7fee9c2895e3 - __GI___clone
  45:                0x0 - <unknown>

cc @petrochenkov

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

Nemo157 commented Feb 6, 2022

One thing I forgot to do is check that my minimization is exhaustive. After deleting all the pub static from the original crate it still ICEs, so there must be another way that it is triggering this too.

@apiraino
Copy link
Contributor

apiraino commented Feb 6, 2022

Could this issue be related/duplicate of #93476 (and therefore fixed by #92533)?

Also, perhaps replace the team label with T-rustdoc?

@Nemo157
Copy link
Member Author

Nemo157 commented Feb 6, 2022

Could this issue be related/duplicate of #93476 (and therefore fixed by #92533)?

I assume you meant #93539? That was included in last night's nightly which I tested with (we have a collection of failing crates in docs.rs that I am rebuilding as each fix for the fallout from #88679 lands).

@Nemo157 Nemo157 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 6, 2022
@petrochenkov
Copy link
Contributor

Fixed in #93766.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 17, 2022
…,GuillaumeGomez

rustdoc: Collect traits in scope for lang items

Inherent impls on primitive types are not included in the list of all inherent impls in the crate (`inherent_impls_in_crate_untracked`), they are taken from the list of lang items instead, but such impls can also be inlined by rustdoc, e.g. if something derefs to a primitive type.

r? `@camelid`
Fixes rust-lang#93698
@bors bors closed this as completed in b8c56fa Feb 18, 2022
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Feb 18, 2022
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-nightly Performance or correctness regression from stable to nightly. 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.

4 participants