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

ICE in rustdoc intra-doc link #95733

Closed
GuillaumeGomez opened this issue Apr 6, 2022 · 3 comments
Closed

ICE in rustdoc intra-doc link #95733

GuillaumeGomez opened this issue Apr 6, 2022 · 3 comments
Labels
C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@GuillaumeGomez
Copy link
Member

We just got this ICE in gtk-rs CI. The same code didn't crash with yesterday's nightly so the bug appeared in the meantime.

warning: unresolved link to `crate::glib::Bytes::new_from_bytes`
Warning:    --> gio/src/auto/output_stream.rs:336:66
    |
336 |     /// remaining bytes, using [`glib::Bytes::new_from_bytes()`][crate::glib::Bytes::new_from_bytes()]. Passing the same
    |                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the struct `Bytes` has no function named `new_from_bytes`

thread 'rustc' panicked at 'internal error: entered unreachable code', compiler/rustc_resolve/src/lib.rs:3302:67
stack backtrace:
   0:     0x7fb26460adbd - std::backtrace_rs::backtrace::libunwind::trace::hed55b2655d2d24d4
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb26460adbd - std::backtrace_rs::backtrace::trace_unsynchronized::hdb09b6d01f28fc36
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb26460adbd - std::sys_common::backtrace::_print_fmt::h85d73dd15e59a966
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fb26460adbd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h467642c35f832dfc
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fb264664bfc - core::fmt::write::h80ceeb54ece7aa73
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/core/src/fmt/mod.rs:1194:17
   5:     0x7fb2645fc671 - std::io::Write::write_fmt::hdad4cd8743ef8ba3
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/io/mod.rs:1655:15
   6:     0x7fb26460dce5 - std::sys_common::backtrace::_print::h7e8d4c312968a3a4
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fb26460dce5 - std::sys_common::backtrace::print::he2f3552019b2ee9b
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fb26460dce5 - std::panicking::default_hook::{{closure}}::hf0781cd99cbd97bb
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:295:22
   9:     0x7fb26460d959 - std::panicking::default_hook::h3afb6754f35bb197
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:314:9
  10:     0x7fb264dad2b1 - rustc_driver[7757471c23bcdd79]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fb25118b173 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h01e81fd5d18e9102
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/alloc/src/boxed.rs:1875:9
  12:     0x7fb25121f97c - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::hf457e8ffb40247bf
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/proc_macro/src/bridge/client.rs:319:21
  13:     0x7fb251196f40 - std::panicking::update_hook::{{closure}}::h26ac063aae77af5d
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:258:41
  14:     0x7fb26460e480 - std::panicking::rust_panic_with_hook::he026b558348e638c
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:702:17
  15:     0x7fb26460e279 - std::panicking::begin_panic_handler::{{closure}}::h7d8266517b3a97b3
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:586:13
  16:     0x7fb26460b274 - std::sys_common::backtrace::__rust_end_short_backtrace::hd820e490164f416e
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:138:18
  17:     0x7fb26460dfe9 - rust_begin_unwind
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:584:5
  18:     0x7fb2645d2603 - core::panicking::panic_fmt::h8045f7299830fe26
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/core/src/panicking.rs:143:14
  19:     0x7fb2645d24cd - core::panicking::panic::heafaed44edc5d2f0
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/core/src/panicking.rs:48:5
  20:     0x7fb265201bac - <rustc_resolve[63bbea3e439f8aba]::Resolver>::resolve_rustdoc_path
  21:     0x55e6180fddb0 - <rustdoc[4dafd65c5212ebd7]::core::DocContext>::enter_resolver::<<rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector>::resolve_path::{closure#0}, core[93896c7deb4583e1]::option::Option<rustc_hir[f54027a8bc11733a]::def::Res<rustc_ast[6b1b21165e8c3805]::node_id::NodeId>>>
  22:     0x55e6180b8a87 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  23:     0x55e6180b96e7 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector>::resolve
  24:     0x55e6180bf623 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_item
  25:     0x55e6180cc8ca - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_inner_recur
  26:     0x55e6180c2d16 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_item
  27:     0x55e6180cc88a - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_inner_recur
  28:     0x55e6180c2cf4 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_item
  29:     0x55e6180cc88a - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_inner_recur
  30:     0x55e6180c2cf4 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_item
  31:     0x55e6180b7f5c - rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::collect_intra_doc_links
  32:     0x55e6180d2602 - <rustc_session[93cf466beccfe173]::session::Session>::time::<(rustdoc[4dafd65c5212ebd7]::clean::types::Crate, rustdoc[4dafd65c5212ebd7]::config::RenderOptions, rustdoc[4dafd65c5212ebd7]::formats::cache::Cache), rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#0}>
  33:     0x55e618161496 - <rustc_interface[3aa5dcd3b29cadd6]::passes::QueryContext>::enter::<rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}::{closure#0}::{closure#1}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>
  34:     0x55e61805c229 - <rustc_interface[3aa5dcd3b29cadd6]::interface::Compiler>::enter::<rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>
  35:     0x55e617ecb936 - rustc_span[783d01233175f916]::with_source_map::<core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>, rustc_interface[3aa5dcd3b29cadd6]::interface::create_compiler_and_run<core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>, rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}>::{closure#1}>
  36:     0x55e61805e9d4 - rustc_interface[3aa5dcd3b29cadd6]::interface::create_compiler_and_run::<core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>, rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}>
  37:     0x55e617ee6e9b - rustdoc[4dafd65c5212ebd7]::main_options
  38:     0x55e617f0eadb - <scoped_tls[be19827943045dee]::ScopedKey<rustc_span[783d01233175f916]::SessionGlobals>>::set::<rustdoc[4dafd65c5212ebd7]::main_args::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>
  39:     0x55e6180842af - std[be2b2098f2565a09]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[3aa5dcd3b29cadd6]::util::run_in_thread_pool_with_globals<rustdoc[4dafd65c5212ebd7]::main_args::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>
  40:     0x55e61811ee69 - <<std[be2b2098f2565a09]::thread::Builder>::spawn_unchecked_<rustc_interface[3aa5dcd3b29cadd6]::util::run_in_thread_pool_with_globals<rustdoc[4dafd65c5212ebd7]::main_args::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>::{closure#1} as core[93896c7deb4583e1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  41:     0x7fb264618553 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5e2ec464c6633a37
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/alloc/src/boxed.rs:1861:9
  42:     0x7fb264618553 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0630748fae134b06
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/alloc/src/boxed.rs:1861:9
  43:     0x7fb264618553 - std::sys::unix::thread::Thread::new::thread_start::h9400fecba0bc7090
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys/unix/thread.rs:108:17
  44:     0x7fb26454c590 - start_thread
  45:     0x7fb2642f5223 - clone
  46:                0x0 - <unknown>

error: internal compiler error: unexpected panic
Error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.

I'll try to make a minimum reproducible case as soon as possible.

Maybe it's linked to our recent changes @petrochenkov ?

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Apr 6, 2022
@petrochenkov
Copy link
Contributor

This should be fixed by #95681.
Could you check whether that commit exists in the compiler branch that you are testing?

@GuillaumeGomez
Copy link
Member Author

Even simpler: we can just re-check with tomorrow's nightly. :)

@GuillaumeGomez
Copy link
Member Author

It was fixed by #95681. Closing it then.

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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants