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: rustdoc: bad typedef with mismaching types #106226

Closed
matthiaskrgr opened this issue Dec 28, 2022 · 0 comments · Fixed by #106366
Closed

ICE: rustdoc: bad typedef with mismaching types #106226

matthiaskrgr opened this issue Dec 28, 2022 · 0 comments · Fixed by #106366
Labels
C-bug Category: This is a bug. 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

@matthiaskrgr
Copy link
Member

Code

type f = [_; ()];

Meta

rustc --version --verbose:

<version>

Error output

rustc 1.68.0-nightly (92c1937a9 2022-12-27)
binary: rustc
commit-hash: 92c1937a90e5b6f20fa6e87016d6869da363972e
commit-date: 2022-12-27
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6
Backtrace

warning: type `f` should have an upper camel case name
 --> 3e013b73d4827d798a08206be767a4c18a0c158b.rs:1:6
  |
1 | type f = [_; ()];
  |      ^ help: convert the identifier to upper camel case (notice the capitalization): `F`
  |
  = note: `#[warn(non_camel_case_types)]` on by default

error[E0308]: mismatched types
 --> 3e013b73d4827d798a08206be767a4c18a0c158b.rs:1:14
  |
1 | type f = [_; ()];
  |              ^^ expected `usize`, found `()`

thread 'rustc' panicked at 'Error', src/librustdoc/clean/mod.rs:1856:25
stack backtrace:
   0:     0x7f8351b653da - std::backtrace_rs::backtrace::libunwind::trace::hd9920c45cab02727
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f8351b653da - std::backtrace_rs::backtrace::trace_unsynchronized::h0e8ba232432f278b
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f8351b653da - std::sys_common::backtrace::_print_fmt::h70b1bf152d50d826
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f8351b653da - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0f8a00c5ac0ea98c
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f8351bc862e - core::fmt::write::h75194d37b0340e77
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f8351b55885 - std::io::Write::write_fmt::h019baaeffa3c233d
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/io/mod.rs:1682:15
   6:     0x7f8351b651a5 - std::sys_common::backtrace::_print::hd2cb40128730a76d
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f8351b651a5 - std::sys_common::backtrace::print::h30c90b179f5588ff
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f8351b67f6f - std::panicking::default_hook::{{closure}}::hb4605418c1ac9dde
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/panicking.rs:267:22
   9:     0x7f8351b67cab - std::panicking::default_hook::h911627d2c5874d29
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/panicking.rs:286:9
  10:     0x7f8354e6ce4f - rustc_driver[be31376d096510e8]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f8351b687ad - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h30886b880f16ecd7
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/alloc/src/boxed.rs:2032:9
  12:     0x7f8351b687ad - std::panicking::rust_panic_with_hook::h7c2b44024a401155
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/panicking.rs:692:13
  13:     0x7f8351b684e2 - std::panicking::begin_panic_handler::{{closure}}::h8e64ae5b7bafe3c0
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/panicking.rs:577:13
  14:     0x7f8351b6588c - std::sys_common::backtrace::__rust_end_short_backtrace::hd43ee2e6b4a0d8d6
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f8351b68232 - rust_begin_unwind
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/panicking.rs:575:5
  16:     0x7f8351bc5013 - core::panicking::panic_fmt::hfd723e1f10b23e9d
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/core/src/panicking.rs:64:14
  17:     0x56023a4deeaf - rustdoc[8f23bbef6cf7efb7]::clean::clean_middle_ty
  18:     0x56023a4ddfda - rustdoc[8f23bbef6cf7efb7]::clean::clean_middle_ty
  19:     0x56023a3fee21 - <rustdoc[8f23bbef6cf7efb7]::core::DocContext>::with_param_env::<alloc[c40375f0f7ff5c91]::vec::Vec<rustdoc[8f23bbef6cf7efb7]::clean::types::Item>, rustdoc[8f23bbef6cf7efb7]::clean::clean_maybe_renamed_item::{closure#1}>
  20:     0x56023a4a6efc - <&mut rustdoc[8f23bbef6cf7efb7]::clean::clean_doc_module::{closure#2} as core[468623a6da7d9ec9]::ops::function::FnOnce<(&(&rustc_hir[de13f172e2d2f68e]::hir::Item, core[468623a6da7d9ec9]::option::Option<rustc_span[414a16377e6cb62b]::symbol::Symbol>, core[468623a6da7d9ec9]::option::Option<rustc_hir[de13f172e2d2f68e]::hir_id::HirId>),)>>::call_once
  21:     0x56023a26d894 - <alloc[c40375f0f7ff5c91]::vec::Vec<rustdoc[8f23bbef6cf7efb7]::clean::types::Item> as alloc[c40375f0f7ff5c91]::vec::spec_extend::SpecExtend<rustdoc[8f23bbef6cf7efb7]::clean::types::Item, core[468623a6da7d9ec9]::iter::adapters::flatten::FlatMap<core[468623a6da7d9ec9]::slice::iter::Iter<(&rustc_hir[de13f172e2d2f68e]::hir::Item, core[468623a6da7d9ec9]::option::Option<rustc_span[414a16377e6cb62b]::symbol::Symbol>, core[468623a6da7d9ec9]::option::Option<rustc_hir[de13f172e2d2f68e]::hir_id::HirId>)>, alloc[c40375f0f7ff5c91]::vec::Vec<rustdoc[8f23bbef6cf7efb7]::clean::types::Item>, rustdoc[8f23bbef6cf7efb7]::clean::clean_doc_module::{closure#2}>>>::spec_extend
  22:     0x56023a4ad3e8 - rustdoc[8f23bbef6cf7efb7]::clean::clean_doc_module
  23:     0x56023a1b4171 - rustdoc[8f23bbef6cf7efb7]::clean::utils::krate
  24:     0x56023a374954 - <rustc_session[484a5cd1f43b0798]::session::Session>::time::<rustdoc[8f23bbef6cf7efb7]::clean::types::Crate, rustdoc[8f23bbef6cf7efb7]::core::run_global_ctxt::{closure#4}>
  25:     0x56023a403767 - rustdoc[8f23bbef6cf7efb7]::core::run_global_ctxt
  26:     0x56023a375ca4 - <rustc_interface[e3f740b58bbe8d54]::passes::QueryContext>::enter::<rustdoc[8f23bbef6cf7efb7]::main_args::{closure#1}::{closure#0}::{closure#1}, core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>>
  27:     0x56023a1c778a - <rustc_interface[e3f740b58bbe8d54]::interface::Compiler>::enter::<rustdoc[8f23bbef6cf7efb7]::main_args::{closure#1}::{closure#0}, core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>>
  28:     0x56023a30d86a - rustc_span[414a16377e6cb62b]::with_source_map::<core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>, rustc_interface[e3f740b58bbe8d54]::interface::run_compiler<core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>, rustdoc[8f23bbef6cf7efb7]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  29:     0x56023a192695 - <scoped_tls[b199c6e77ce176e9]::ScopedKey<rustc_span[414a16377e6cb62b]::SessionGlobals>>::set::<rustc_interface[e3f740b58bbe8d54]::interface::run_compiler<core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>, rustdoc[8f23bbef6cf7efb7]::main_args::{closure#1}>::{closure#0}, core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>>
  30:     0x56023a3200b0 - std[f1a6b9449c89a13c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e3f740b58bbe8d54]::util::run_in_thread_pool_with_globals<rustc_interface[e3f740b58bbe8d54]::interface::run_compiler<core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>, rustdoc[8f23bbef6cf7efb7]::main_args::{closure#1}>::{closure#0}, core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>>
  31:     0x56023a47a9df - <<std[f1a6b9449c89a13c]::thread::Builder>::spawn_unchecked_<rustc_interface[e3f740b58bbe8d54]::util::run_in_thread_pool_with_globals<rustc_interface[e3f740b58bbe8d54]::interface::run_compiler<core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>, rustdoc[8f23bbef6cf7efb7]::main_args::{closure#1}>::{closure#0}, core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[468623a6da7d9ec9]::result::Result<(), rustc_errors[78faa046e0c9ca7a]::ErrorGuaranteed>>::{closure#1} as core[468623a6da7d9ec9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  32:     0x7f8351b72c53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h633e4f7ed41b131b
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/alloc/src/boxed.rs:2000:9
  33:     0x7f8351b72c53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h46d52a363ffe776a
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/alloc/src/boxed.rs:2000:9
  34:     0x7f8351b72c53 - std::sys::unix::thread::Thread::new::thread_start::h6d9ed7daf86174ef
                               at /rustc/92c1937a90e5b6f20fa6e87016d6869da363972e/library/std/src/sys/unix/thread.rs:108:17
  35:     0x7f83519048fd - <unknown>
  36:     0x7f8351986a60 - <unknown>
  37:                0x0 - <unknown>

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.68.0-nightly (92c1937a9 2022-12-27) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to previous error; 1 warning emitted

@matthiaskrgr matthiaskrgr 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) ❄️ C-bug Category: This is a bug. labels Dec 28, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 2, 2023
@bors bors closed this as completed in ea3c4d8 Jan 3, 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) ❄️ 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.

1 participant