Skip to content

ICE: rustdoc: Could not find associated const on trait #106079

Closed
@matthiaskrgr

Description

@matthiaskrgr
Member

Code

./src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs

trait X {
    type Y<'a>;
}

const _: () = {
  fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
      //~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
      //~| ERROR this associated type takes 0 generic arguments but 1 generic argument
};

fn main() {}

Meta

rustc --version --verbose:

rustc 1.68.0-nightly (8a97b4812 2022-12-22)
binary: rustc
commit-hash: 8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9
commit-date: 2022-12-22
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Error output

<output>
Backtrace

thread 'rustc' panicked at 'Error', src/librustdoc/clean/mod.rs:1856:25
stack backtrace:
   0:     0x7f3c8ab65a7a - std::backtrace_rs::backtrace::libunwind::trace::h250f5acc74207c14
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f3c8ab65a7a - std::backtrace_rs::backtrace::trace_unsynchronized::h8b2cc87ea209f556
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f3c8ab65a7a - std::sys_common::backtrace::_print_fmt::he79fe9ac625765a8
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f3c8ab65a7a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1b8cfd7233c5cf16
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f3c8abc87ae - core::fmt::write::hf4356953bb6287e9
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f3c8ab55e45 - std::io::Write::write_fmt::h777ff3ca89a9d1e9
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/io/mod.rs:1682:15
   6:     0x7f3c8ab65845 - std::sys_common::backtrace::_print::h30bd0c5979c85003
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f3c8ab65845 - std::sys_common::backtrace::print::he11670adbc4564f8
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f3c8ab6858f - std::panicking::default_hook::{{closure}}::h2b850e11ab02b140
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:267:22
   9:     0x7f3c8ab682cb - std::panicking::default_hook::h5e8af7c8d5de5af1
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:286:9
  10:     0x7f3c8de4d151 - rustc_driver[b1659719c04a24c8]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f3c8ab68dcd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3e73a49254418f01
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/alloc/src/boxed.rs:2032:9
  12:     0x7f3c8ab68dcd - std::panicking::rust_panic_with_hook::hfdcd0659796f0493
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:692:13
  13:     0x7f3c8ab68b02 - std::panicking::begin_panic_handler::{{closure}}::h1da0d3ec43a330b4
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:577:13
  14:     0x7f3c8ab65f2c - std::sys_common::backtrace::__rust_end_short_backtrace::hda54127fbb19e796
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f3c8ab68852 - rust_begin_unwind
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:575:5
  16:     0x7f3c8abc5193 - core::panicking::panic_fmt::h757cae3820c90eb4
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/core/src/panicking.rs:64:14
  17:     0x564000a003ef - rustdoc[b533b40e318b555]::clean::clean_middle_ty
  18:     0x5640009cf74f - rustdoc[b533b40e318b555]::clean::clean_const
  19:     0x564000953b13 - <core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::GenericArg>, rustdoc[b533b40e318b555]::clean::clean_generic_args::{closure#1}> as core[838cd329d32ba501]::iter::traits::iterator::Iterator>::fold::<(), core[838cd329d32ba501]::iter::traits::iterator::Iterator::for_each::call<rustdoc[b533b40e318b555]::clean::types::GenericArg, <alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::GenericArg>>::extend_trusted<core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::GenericArg>, rustdoc[b533b40e318b555]::clean::clean_generic_args::{closure#1}>>::{closure#0}>::{closure#0}>
  20:     0x564000795d5e - <alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::GenericArg> as alloc[225e6e9bb7b947dc]::vec::spec_from_iter::SpecFromIter<rustdoc[b533b40e318b555]::clean::types::GenericArg, core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::GenericArg>, rustdoc[b533b40e318b555]::clean::clean_generic_args::{closure#1}>>>::from_iter
  21:     0x5640009db7a3 - rustdoc[b533b40e318b555]::clean::clean_generic_args
  22:     0x5640009db849 - rustdoc[b533b40e318b555]::clean::clean_generic_args
  23:     0x5640009c5c7d - <thin_vec[c3567fdbde1f8e7]::ThinVec<rustdoc[b533b40e318b555]::clean::types::PathSegment> as core[838cd329d32ba501]::iter::traits::collect::FromIterator<rustdoc[b533b40e318b555]::clean::types::PathSegment>>::from_iter::<core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::PathSegment>, rustdoc[b533b40e318b555]::clean::clean_path::{closure#0}>>
  24:     0x5640009d61e0 - rustdoc[b533b40e318b555]::clean::clean_poly_trait_ref
  25:     0x56400079befe - <alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::PolyTrait> as alloc[225e6e9bb7b947dc]::vec::spec_from_iter::SpecFromIter<rustdoc[b533b40e318b555]::clean::types::PolyTrait, core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::PolyTraitRef>, rustdoc[b533b40e318b555]::clean::clean_ty::{closure#2}>>>::from_iter
  26:     0x5640009da42e - rustdoc[b533b40e318b555]::clean::clean_ty
  27:     0x564000953aca - <core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::GenericArg>, rustdoc[b533b40e318b555]::clean::clean_generic_args::{closure#1}> as core[838cd329d32ba501]::iter::traits::iterator::Iterator>::fold::<(), core[838cd329d32ba501]::iter::traits::iterator::Iterator::for_each::call<rustdoc[b533b40e318b555]::clean::types::GenericArg, <alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::GenericArg>>::extend_trusted<core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::GenericArg>, rustdoc[b533b40e318b555]::clean::clean_generic_args::{closure#1}>>::{closure#0}>::{closure#0}>
  28:     0x564000795d5e - <alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::GenericArg> as alloc[225e6e9bb7b947dc]::vec::spec_from_iter::SpecFromIter<rustdoc[b533b40e318b555]::clean::types::GenericArg, core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::GenericArg>, rustdoc[b533b40e318b555]::clean::clean_generic_args::{closure#1}>>>::from_iter
  29:     0x5640009db7a3 - rustdoc[b533b40e318b555]::clean::clean_generic_args
  30:     0x5640009c5c7d - <thin_vec[c3567fdbde1f8e7]::ThinVec<rustdoc[b533b40e318b555]::clean::types::PathSegment> as core[838cd329d32ba501]::iter::traits::collect::FromIterator<rustdoc[b533b40e318b555]::clean::types::PathSegment>>::from_iter::<core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::PathSegment>, rustdoc[b533b40e318b555]::clean::clean_path::{closure#0}>>
  31:     0x5640009d910b - rustdoc[b533b40e318b555]::clean::clean_qpath
  32:     0x5640009da54c - rustdoc[b533b40e318b555]::clean::clean_ty
  33:     0x56400079b179 - <alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::Argument> as alloc[225e6e9bb7b947dc]::vec::spec_from_iter::SpecFromIter<rustdoc[b533b40e318b555]::clean::types::Argument, core[838cd329d32ba501]::iter::adapters::map::Map<core[838cd329d32ba501]::iter::adapters::enumerate::Enumerate<core[838cd329d32ba501]::slice::iter::Iter<rustc_hir[cdef261b456c4bde]::hir::Ty>>, rustdoc[b533b40e318b555]::clean::clean_args_from_types_and_body_id::{closure#0}>>>::from_iter
  34:     0x5640006d6a29 - rustdoc[b533b40e318b555]::clean::utils::enter_impl_trait::<rustdoc[b533b40e318b555]::clean::clean_function::{closure#0}, (rustdoc[b533b40e318b555]::clean::types::Generics, rustdoc[b533b40e318b555]::clean::types::FnDecl)>
  35:     0x5640009d513b - rustdoc[b533b40e318b555]::clean::clean_fn_or_proc_macro
  36:     0x56400091d603 - <rustdoc[b533b40e318b555]::core::DocContext>::with_param_env::<alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::Item>, rustdoc[b533b40e318b555]::clean::clean_maybe_renamed_item::{closure#1}>
  37:     0x5640009c835c - <&mut rustdoc[b533b40e318b555]::clean::clean_doc_module::{closure#2} as core[838cd329d32ba501]::ops::function::FnOnce<(&(&rustc_hir[cdef261b456c4bde]::hir::Item, core[838cd329d32ba501]::option::Option<rustc_span[506ca92461b63806]::symbol::Symbol>, core[838cd329d32ba501]::option::Option<rustc_hir[cdef261b456c4bde]::hir_id::HirId>),)>>::call_once
  38:     0x56400078c114 - <alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::Item> as alloc[225e6e9bb7b947dc]::vec::spec_extend::SpecExtend<rustdoc[b533b40e318b555]::clean::types::Item, core[838cd329d32ba501]::iter::adapters::flatten::FlatMap<core[838cd329d32ba501]::slice::iter::Iter<(&rustc_hir[cdef261b456c4bde]::hir::Item, core[838cd329d32ba501]::option::Option<rustc_span[506ca92461b63806]::symbol::Symbol>, core[838cd329d32ba501]::option::Option<rustc_hir[cdef261b456c4bde]::hir_id::HirId>)>, alloc[225e6e9bb7b947dc]::vec::Vec<rustdoc[b533b40e318b555]::clean::types::Item>, rustdoc[b533b40e318b555]::clean::clean_doc_module::{closure#2}>>>::spec_extend
  39:     0x5640009ce988 - rustdoc[b533b40e318b555]::clean::clean_doc_module
  40:     0x5640006d2b61 - rustdoc[b533b40e318b555]::clean::utils::krate
  41:     0x5640008934f4 - <rustc_session[9a79971eab3e0f2f]::session::Session>::time::<rustdoc[b533b40e318b555]::clean::types::Crate, rustdoc[b533b40e318b555]::core::run_global_ctxt::{closure#4}>
  42:     0x5640009222b7 - rustdoc[b533b40e318b555]::core::run_global_ctxt
  43:     0x564000894844 - <rustc_interface[27db4dcdd626da73]::passes::QueryContext>::enter::<rustdoc[b533b40e318b555]::main_args::{closure#1}::{closure#0}::{closure#1}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>
  44:     0x5640006e612a - <rustc_interface[27db4dcdd626da73]::interface::Compiler>::enter::<rustdoc[b533b40e318b555]::main_args::{closure#1}::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>
  45:     0x56400082c20a - rustc_span[506ca92461b63806]::with_source_map::<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  46:     0x5640006b10b5 - <scoped_tls[57eb591005101a44]::ScopedKey<rustc_span[506ca92461b63806]::SessionGlobals>>::set::<rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>
  47:     0x56400083e900 - std[1a5a851d154403c1]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[27db4dcdd626da73]::util::run_in_thread_pool_with_globals<rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>
  48:     0x56400099c02f - <<std[1a5a851d154403c1]::thread::Builder>::spawn_unchecked_<rustc_interface[27db4dcdd626da73]::util::run_in_thread_pool_with_globals<rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>::{closure#1} as core[838cd329d32ba501]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  49:     0x7f3c8ab72dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8220a33137e05636
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/alloc/src/boxed.rs:2000:9
  50:     0x7f3c8ab72dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hcde99a22c299cd7f
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/alloc/src/boxed.rs:2000:9
  51:     0x7f3c8ab72dc3 - std::sys::unix::thread::Thread::new::thread_start::h608d02a3e5faa1ee
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys/unix/thread.rs:108:17
  52:     0x7f3c8a8d98fd - <unknown>
  53:     0x7f3c8a95ba60 - <unknown>
  54:                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 (8a97b4812 2022-12-22) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: Could not find associated const on trait
  |
  = note: delayed at compiler/rustc_hir_analysis/src/collect/type_of.rs:509:29

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1610:13
stack backtrace:
   0:     0x7f3c8ab65a7a - std::backtrace_rs::backtrace::libunwind::trace::h250f5acc74207c14
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f3c8ab65a7a - std::backtrace_rs::backtrace::trace_unsynchronized::h8b2cc87ea209f556
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f3c8ab65a7a - std::sys_common::backtrace::_print_fmt::he79fe9ac625765a8
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f3c8ab65a7a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1b8cfd7233c5cf16
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f3c8abc87ae - core::fmt::write::hf4356953bb6287e9
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f3c8ab55e45 - std::io::Write::write_fmt::h777ff3ca89a9d1e9
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/io/mod.rs:1682:15
   6:     0x7f3c8ab65845 - std::sys_common::backtrace::_print::h30bd0c5979c85003
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f3c8ab65845 - std::sys_common::backtrace::print::he11670adbc4564f8
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f3c8ab6858f - std::panicking::default_hook::{{closure}}::h2b850e11ab02b140
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:267:22
   9:     0x7f3c8ab682cb - std::panicking::default_hook::h5e8af7c8d5de5af1
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:286:9
  10:     0x7f3c8de4d151 - rustc_driver[b1659719c04a24c8]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f3c8ab68dcd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3e73a49254418f01
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/alloc/src/boxed.rs:2032:9
  12:     0x7f3c8ab68dcd - std::panicking::rust_panic_with_hook::hfdcd0659796f0493
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/panicking.rs:692:13
  13:     0x7f3c8de860a1 - std[1a5a851d154403c1]::panicking::begin_panic::<rustc_errors[f3b4af3fda1898a3]::ExplicitBug>::{closure#0}
  14:     0x7f3c8de84976 - std[1a5a851d154403c1]::sys_common::backtrace::__rust_end_short_backtrace::<std[1a5a851d154403c1]::panicking::begin_panic<rustc_errors[f3b4af3fda1898a3]::ExplicitBug>::{closure#0}, !>
  15:     0x7f3c8de626e6 - std[1a5a851d154403c1]::panicking::begin_panic::<rustc_errors[f3b4af3fda1898a3]::ExplicitBug>
  16:     0x7f3c8de81e46 - std[1a5a851d154403c1]::panic::panic_any::<rustc_errors[f3b4af3fda1898a3]::ExplicitBug>
  17:     0x7f3c8d368f96 - <rustc_errors[f3b4af3fda1898a3]::HandlerInner>::flush_delayed::<alloc[225e6e9bb7b947dc]::vec::Vec<rustc_errors[f3b4af3fda1898a3]::diagnostic::Diagnostic>, &str>
  18:     0x7f3c8d36829b - <rustc_errors[f3b4af3fda1898a3]::HandlerInner as core[838cd329d32ba501]::ops::drop::Drop>::drop
  19:     0x564000a1333e - core[838cd329d32ba501]::ptr::drop_in_place::<rustc_session[9a79971eab3e0f2f]::parse::ParseSess>
  20:     0x564000a14c9f - core[838cd329d32ba501]::ptr::drop_in_place::<rustc_session[9a79971eab3e0f2f]::session::Session>
  21:     0x564000834b2d - core[838cd329d32ba501]::ptr::drop_in_place::<rustc_interface[27db4dcdd626da73]::interface::Compiler>
  22:     0x56400082c3c4 - rustc_span[506ca92461b63806]::with_source_map::<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  23:     0x5640006b10b5 - <scoped_tls[57eb591005101a44]::ScopedKey<rustc_span[506ca92461b63806]::SessionGlobals>>::set::<rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>
  24:     0x56400083e900 - std[1a5a851d154403c1]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[27db4dcdd626da73]::util::run_in_thread_pool_with_globals<rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>
  25:     0x56400099c02f - <<std[1a5a851d154403c1]::thread::Builder>::spawn_unchecked_<rustc_interface[27db4dcdd626da73]::util::run_in_thread_pool_with_globals<rustc_interface[27db4dcdd626da73]::interface::run_compiler<core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>, rustdoc[b533b40e318b555]::main_args::{closure#1}>::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[838cd329d32ba501]::result::Result<(), rustc_errors[f3b4af3fda1898a3]::ErrorGuaranteed>>::{closure#1} as core[838cd329d32ba501]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  26:     0x7f3c8ab72dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8220a33137e05636
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/alloc/src/boxed.rs:2000:9
  27:     0x7f3c8ab72dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hcde99a22c299cd7f
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/alloc/src/boxed.rs:2000:9
  28:     0x7f3c8ab72dc3 - std::sys::unix::thread::Thread::new::thread_start::h608d02a3e5faa1ee
                               at /rustc/8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9/library/std/src/sys/unix/thread.rs:108:17
  29:     0x7f3c8a8d98fd - <unknown>
  30:     0x7f3c8a95ba60 - <unknown>
  31:                0x0 - <unknown>

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 (8a97b4812 2022-12-22) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
[1]    3474971 IOT instruction (core dumped)  rustdoc

Activity

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
C-bugCategory: This is a bug.
S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issue
on Dec 23, 2022
matthiaskrgr

matthiaskrgr commented on Dec 23, 2022

@matthiaskrgr
MemberAuthor

Regression in cce9e72

JohnTitor

JohnTitor commented on Jan 21, 2023

@JohnTitor
Member

Triage: This is no longer ICE since nightly-2023-01-21, marking as E-needs-test.

added
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Jan 21, 2023
megakorre

megakorre commented on Feb 27, 2023

@megakorre
Contributor

Tried to add a test. But it seems it had time to regress again. #107000
Edit: there was a revert that "fixed" it #107083 and the another attempt at it after it seems.

searched nightlies: from nightly-2023-01-29 to nightly-2023-02-20
regressed nightly: nightly-2023-02-04
searched commit range: https://github.com/rust-lang/rust/compare/f3126500f25114ba4e0ac3e76694dd45a22de56d...658fad6c5506f41c35b64fb1a22ceb0992697ff3
regressed commit: https://github.com/rust-lang/rust/commit/6c991b07403a3234dd1ec0ac973b8ef97055e605

This ICE happens without the const block. Maybe the regression is just about that it is now walking const blocks but the actual ICE is something else.

megakorre

megakorre commented on Feb 28, 2023

@megakorre
Contributor

The code without the const block.

trait X {
    type Y<'a>;
}
fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}

Has been causing ICE in rustdoc rendering (clean) since GATs rustdoc rendering was introduced in #94009

5 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @megakorre@matthiaskrgr@fmease@JohnTitor@rustbot

        Issue actions

          ICE: rustdoc: `Could not find associated const on trait` · Issue #106079 · rust-lang/rust