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

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

Closed
nazar-pc opened this issue Nov 8, 2022 · 8 comments · Fixed by #104364
Assignees
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nazar-pc
Copy link

nazar-pc commented Nov 8, 2022

Code

# Cargo.toml
[package]
name = "tmp"
version = "0.1.0"
edition = "2021"

[dependencies]
sc-cli = { git = "https://github.com/paritytech/substrate", rev = "335007ca286c964b8f64d47f20a7f4e808b76596", default-features = false }
// src/lib.rs
use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli};
pub struct S {}

impl SubstrateCli for S {
    fn impl_name() -> String {
        todo!()
    }

    fn impl_version() -> String {
        todo!()
    }

    fn executable_name() -> String {
        todo!()
    }

    fn description() -> String {
        todo!()
    }

    fn author() -> String {
        todo!()
    }

    fn support_url() -> String {
        todo!()
    }

    fn copyright_start_year() -> i32 {
        todo!()
    }

    fn load_spec(&self, _id: &str) -> Result<Box<dyn ChainSpec>, String> {
        todo!()
    }

    fn native_runtime_version(_chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
        todo!()
    }
}

Nightly 2022-08-11 worked fine, trying to upgrade from it.

Meta

rustc --version --verbose:

rustc 1.67.0-nightly (73c9eaf21 2022-11-07)

Error output

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

stack backtrace:
   0: rust_begin_unwind
             at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/panicking.rs:65:14
   2: core::panicking::panic_display
             at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/panicking.rs:139:5
   3: core::panicking::panic_str
             at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/panicking.rs:123:5
   4: core::option::expect_failed
             at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/option.rs:1879:5
   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_associated_item
   8: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve
   9: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  10: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
  11: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::core::run_global_ctxt::{closure#7}>
  12: rustdoc::core::run_global_ctxt
  13: <rustc_interface::passes::QueryContext>::enter::<rustdoc::main_args::{closure#1}::{closure#0}::{closure#1}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  14: <rustc_interface::interface::Compiler>::enter::<rustdoc::main_args::{closure#1}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
stack backtrace:
   0:     0x7f9aab3663e0 - std::backtrace_rs::backtrace::libunwind::trace::h7391e70e9743ac3b
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f9aab3663e0 - std::backtrace_rs::backtrace::trace_unsynchronized::hb533880d0da65762
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f9aab3663e0 - std::sys_common::backtrace::_print_fmt::h705fe5c96394747d
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f9aab3663e0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc163ecc0e9e3b67b
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f9aab3c84fe - core::fmt::write::h8a2cd58fbfedc72a
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/fmt/mod.rs:1209:17
   5:     0x7f9aab356555 - std::io::Write::write_fmt::h0856ac540cc5a5a6
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/io/mod.rs:1682:15
   6:     0x7f9aab3661a5 - std::sys_common::backtrace::_print::h85dee81e7d66c5ec
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f9aab3661a5 - std::sys_common::backtrace::print::he51a3a7405ebfeef
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f9aab368f7f - std::panicking::default_hook::{{closure}}::hdc5c50ac26371cf9
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/panicking.rs:267:22
   9:     0x7f9aab368cba - std::panicking::default_hook::h80e60a78e3d971de
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/panicking.rs:286:9
  10:     0x7f9aab36978c - std::panicking::rust_panic_with_hook::h1dda0be18358556d
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/panicking.rs:688:13
  11:     0x7f9aab369527 - std::panicking::begin_panic_handler::{{closure}}::hf22e856169ad9ef9
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/panicking.rs:579:13
  12:     0x7f9aab36688c - std::sys_common::backtrace::__rust_end_short_backtrace::h0a8098570d653a12
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/sys_common/backtrace.rs:137:18
  13:     0x7f9aab369242 - rust_begin_unwind
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/panicking.rs:575:5
  14:     0x7f9aab3c4ee3 - core::panicking::panic_fmt::h3889a73c07f2974e
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/panicking.rs:65:14
  15:     0x7f9aab3c5031 - core::panicking::panic_display::he1cbe86ea3811a4e
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/panicking.rs:139:5
  16:     0x7f9aab3c4fdb - core::panicking::panic_str::heb5f628395cf6727
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/panicking.rs:123:5
  17:     0x7f9aab3c4c56 - core::option::expect_failed::h6b82bcfd294ccb54
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/core/src/option.rs:1879:5
  18:     0x55efd4e71064 - rustdoc[bd11fd260fa8c367]::passes::collect_intra_doc_links::resolve_associated_trait_item
  19:     0x55efd4e6fd7a - <rustdoc[bd11fd260fa8c367]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
  20:     0x55efd4e6f6ae - <rustdoc[bd11fd260fa8c367]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
  21:     0x55efd4e6e1c3 - <rustdoc[bd11fd260fa8c367]::passes::collect_intra_doc_links::LinkCollector>::resolve
  22:     0x55efd4e72e54 - <rustdoc[bd11fd260fa8c367]::passes::collect_intra_doc_links::LinkCollector as rustdoc[bd11fd260fa8c367]::visit::DocVisitor>::visit_item
  23:     0x55efd4e6c981 - rustdoc[bd11fd260fa8c367]::passes::collect_intra_doc_links::collect_intra_doc_links
  24:     0x55efd4eb123d - <rustc_session[e1c0e77f9267ad21]::session::Session>::time::<rustdoc[bd11fd260fa8c367]::clean::types::Crate, rustdoc[bd11fd260fa8c367]::core::run_global_ctxt::{closure#7}>
  25:     0x55efd4e519e3 - rustdoc[bd11fd260fa8c367]::core::run_global_ctxt
  26:     0x55efd4eb342b - <rustc_interface[b44c90d511d35004]::passes::QueryContext>::enter::<rustdoc[bd11fd260fa8c367]::main_args::{closure#1}::{closure#0}::{closure#1}, core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>>
  27:     0x55efd4ca09d4 - <rustc_interface[b44c90d511d35004]::interface::Compiler>::enter::<rustdoc[bd11fd260fa8c367]::main_args::{closure#1}::{closure#0}, core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>>
  28:     0x55efd4e2bf83 - std[3099e10aa4fe13d2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b44c90d511d35004]::util::run_in_thread_pool_with_globals<rustc_interface[b44c90d511d35004]::interface::run_compiler<core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>, rustdoc[bd11fd260fa8c367]::main_args::{closure#1}>::{closure#0}, core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>>
  29:     0x55efd4f88294 - <<std[3099e10aa4fe13d2]::thread::Builder>::spawn_unchecked_<rustc_interface[b44c90d511d35004]::util::run_in_thread_pool_with_globals<rustc_interface[b44c90d511d35004]::interface::run_compiler<core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>, rustdoc[bd11fd260fa8c367]::main_args::{closure#1}>::{closure#0}, core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[4b2b0deea27c41b6]::result::Result<(), rustc_errors[d2620e72348e50be]::ErrorGuaranteed>>::{closure#1} as core[4b2b0deea27c41b6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:     0x7f9aab373223 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0a2da3c9f7775f02
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/alloc/src/boxed.rs:2000:9
  31:     0x7f9aab373223 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5a8a8dd9681451d3
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/alloc/src/boxed.rs:2000:9
  32:     0x7f9aab373223 - std::sys::unix::thread::Thread::new::thread_start::h2969eac27ae641a2
                               at /rustc/73c9eaf21454b718e7c549984d9eb6e1f75e995c/library/std/src/sys/unix/thread.rs:108:17
  33:     0x7f9aab094b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  34:     0x7f9aab126a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  35:                0x0 - <unknown>

@nazar-pc nazar-pc added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 8, 2022
@dhardy
Copy link
Contributor

dhardy commented Nov 8, 2022

Same error, same rustc version

@fmease
Copy link
Member

fmease commented Nov 8, 2022

@rustbot label E-needs-mcve -T-compiler +T-rustdoc

@rustbot
Copy link
Collaborator

rustbot commented Nov 8, 2022

Error: Label needs-mcve can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@rustbot rustbot added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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 Nov 8, 2022
@kpreid
Copy link
Contributor

kpreid commented Nov 8, 2022

I don't have a MCVE but the same problem on the same nightly version happens with a dependency of luminance-glfw = "0.18.2". Sounds awfully similar to #103463 also involving luminance deps, but that one's definitely fixed.

@GuillaumeGomez
Copy link
Member

Pinging @petrochenkov since they're the last one who worked on this. Maybe you have an idea?

@dhardy
Copy link
Contributor

dhardy commented Nov 8, 2022

Somewhat minimal example: kas-mcve-rustdoc-no-entry.zip

Removing the Scrollable impl avoids the bug.

@petrochenkov petrochenkov self-assigned this Nov 8, 2022
@dhardy
Copy link
Contributor

dhardy commented Nov 10, 2022

This happens with beta too: rustc 1.66.0-beta.1 (e080cc5a6 2022-11-01)

@petrochenkov
Copy link
Contributor

Fixed in #104364.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 14, 2022
…omez

rustdoc: Resolve doc links in external traits having local impls

For external impls it was done in rust-lang#103192 right away, but the local impl case was forgotten.

Fixes rust-lang#104145.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 14, 2022
…omez

rustdoc: Resolve doc links in external traits having local impls

For external impls it was done in rust-lang#103192 right away, but the local impl case was forgotten.

Fixes rust-lang#104145.
@bors bors closed this as completed in dc869fc Nov 15, 2022
hawkw added a commit to hawkw/mycelium that referenced this issue Nov 15, 2022
This appears not to have the fix for rust-lang/rust#104145 yet, as it's
currently on rust-lang/rust@96ddd32,
and the fix was merged in
rust-lang/rust@dc869fc, but I figured
I'd bump anyway. Tomorrow's nightly should be good again!
hawkw added a commit to hawkw/mycelium that referenced this issue Nov 16, 2022
This contains the fix for rust-lang/rust#104145, so our docs build now!
hawkw added a commit to hawkw/mycelium that referenced this issue Nov 16, 2022
This appears not to have the fix for rust-lang/rust#104145 yet, as it's
currently on rust-lang/rust@96ddd32,
and the fix was merged in
rust-lang/rust@dc869fc, but I figured
I'd bump anyway. Tomorrow's nightly should be good again!
hawkw added a commit to hawkw/mycelium that referenced this issue Nov 16, 2022
This contains the fix for rust-lang/rust#104145, so our docs build now!
hawkw added a commit to hawkw/mycelium that referenced this issue Nov 16, 2022
This appears not to have the fix for rust-lang/rust#104145 yet, as it's
currently on rust-lang/rust@96ddd32,
and the fix was merged in
rust-lang/rust@dc869fc, but I figured
I'd bump anyway. Tomorrow's nightly should be good again!
hawkw added a commit to hawkw/mycelium that referenced this issue Nov 16, 2022
This contains the fix for rust-lang/rust#104145, so our docs build now!
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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ 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.

7 participants