rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.97k stars 12.69k forks source link

ICE when passing the result of .peekable() to recursive call #126920

Closed adambiltcliffe closed 4 months ago

adambiltcliffe commented 4 months ago

Code

struct Data {
    data: String,
}

fn bad(input: &mut impl Iterator<Item = Data>) {
    let mut p = input.peekable();
    loop {
        bad(&mut p);
    }
}

fn main() {
    bad(&mut std::iter::empty());
}

Meta

rustc --version --verbose:

rustc 1.81.0-nightly (bcf94dec5 2024-06-23)
binary: rustc
commit-hash: bcf94dec5ba6838e435902120c0384c360126a26
commit-date: 2024-06-23
host: x86_64-pc-windows-msvc
release: 1.81.0-nightly
LLVM version: 18.1.7

Error output

thread 'rustc' panicked at /rustc/bcf94dec5ba6838e435902120c0384c360126a26\compiler\rustc_type_ir\src\ty_kind.rs:889:17:
type variables should not be hashed: ?0t
Backtrace

``` stack backtrace: 0: 0x7ffd0243d5b3 - std::backtrace_rs::backtrace::dbghelp64::trace at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91 1: 0x7ffd0243d5b3 - std::backtrace_rs::backtrace::trace_unsynchronized at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66 2: 0x7ffd0243d5b3 - std::backtrace::Backtrace::create at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\backtrace.rs:331 3: 0x7ffd0243d4fa - std::backtrace::Backtrace::force_capture at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\backtrace.rs:312 4: 0x7ffcb8279b41 - memchr 5: 0x7ffd02457247 - alloc::boxed::impl$50::call at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\alloc\src\boxed.rs:2078 6: 0x7ffd02457247 - std::panicking::rust_panic_with_hook at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\panicking.rs:804 7: 0x7ffd02457056 - std::panicking::begin_panic_handler::closure$0 at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\panicking.rs:670 8: 0x7ffd024544ff - std::sys::backtrace::__rust_end_short_backtrace at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\sys\backtrace.rs:171 9: 0x7ffd02456cb6 - std::panicking::begin_panic_handler at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\panicking.rs:661 10: 0x7ffd024aca34 - core::panicking::panic_fmt at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\core\src\panicking.rs:74 11: 0x7ffcb80279c1 - <&rustc_middle[efe08594ec63cbac]::ty::list::RawList<_, _> as rustc_data_structures[6b6cfc4876cd2fb9]::stable_hasher::HashStable>::hash_stable::CACHE::{closure#0}::VAL::{shim:tls#0} 12: 0x7ffcb8024920 - <&rustc_middle[efe08594ec63cbac]::ty::list::RawList<_, _> as rustc_data_structures[6b6cfc4876cd2fb9]::stable_hasher::HashStable>::hash_stable::CACHE::{closure#0}::VAL::{shim:tls#0} 13: 0x7ffcb7800bdd - rustc_ty_utils[497df0ed0719fc06]::ty::self_ty_of_trait_impl_enabling_order_dep_trait_object_hack 14: 0x7ffcb771bc4e - rustc_ty_utils[497df0ed0719fc06]::ty::self_ty_of_trait_impl_enabling_order_dep_trait_object_hack 15: 0x7ffcb782930f - rustc_query_impl[fb887b361612166]::plumbing::query_key_hash_verify_all 16: 0x7ffcb80890d6 - >::try_fold_ty 17: 0x7ffcb76ac793 - rustc_ty_utils[497df0ed0719fc06]::needs_drop::needs_drop_raw 18: 0x7ffcb7816f4b - rustc_query_impl[fb887b361612166]::plumbing::query_key_hash_verify_all 19: 0x7ffcb7717589 - rustc_ty_utils[497df0ed0719fc06]::ty::self_ty_of_trait_impl_enabling_order_dep_trait_object_hack 20: 0x7ffcb782627c - rustc_query_impl[fb887b361612166]::plumbing::query_key_hash_verify_all 21: 0x7ffcb7697c83 - rustc_ty_utils[497df0ed0719fc06]::instance::resolve_instance 22: 0x7ffcb78175cd - rustc_query_impl[fb887b361612166]::plumbing::query_key_hash_verify_all 23: 0x7ffcb7726f43 - rustc_ty_utils[497df0ed0719fc06]::ty::self_ty_of_trait_impl_enabling_order_dep_trait_object_hack 24: 0x7ffcb782a6ae - rustc_query_impl[fb887b361612166]::plumbing::query_key_hash_verify_all 25: 0x7ffcb80ea152 - ::resolve_drop_in_place 26: 0x7ffcb7ce0dee - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 27: 0x7ffcb7cd9fd3 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 28: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 29: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 30: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 31: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 32: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 33: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 34: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 35: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 36: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 37: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 38: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 39: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 40: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 41: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 42: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 43: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 44: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 45: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 46: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 47: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 48: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 49: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 50: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 51: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 52: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 53: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 54: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 55: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 56: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 57: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 58: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 59: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 60: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 61: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 62: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 63: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 64: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 65: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 66: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 67: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 68: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 69: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 70: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 71: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 72: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 73: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 74: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 75: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 76: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 77: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 78: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 79: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 80: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 81: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 82: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 83: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 84: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 85: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 86: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 87: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 88: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 89: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 90: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 91: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 92: 0x7ffcb7cdb878 - rustc_monomorphize[9e988b656563743c]::is_call_from_compiler_builtins_to_upstream_monomorphization 93: 0x7ffcb7ccf224 - rustc_monomorphize[9e988b656563743c]::partitioning::collect_and_partition_mono_items 94: 0x7ffcb6991e37 - ::write_str 95: 0x7ffcb69772ed - ::write_str 96: 0x7ffcb68a7f22 - rustc_ty_utils[497df0ed0719fc06]::ty::adt_sized_constraint 97: 0x7ffcb69b527e - rustc_query_impl[fb887b361612166]::query_system 98: 0x7ffcb408a344 - ::codegen_crate 99: 0x7ffcb3fdaa33 - rustc_interface[d65d71c3705523e8]::passes::start_codegen 100: 0x7ffcb3fe3d97 - ::codegen_and_build_linker 101: 0x7ffcb3f96272 - _wpgmptr 102: 0x7ffcb3f922ef - _wpgmptr 103: 0x7ffcb3f9b2e9 - _wpgmptr 104: 0x7ffd024680ed - alloc::boxed::impl$48::call_once at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\alloc\src\boxed.rs:2064 105: 0x7ffd024680ed - alloc::boxed::impl$48::call_once at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\alloc\src\boxed.rs:2064 106: 0x7ffd024680ed - std::sys::pal::windows::thread::impl$0::new::thread_start at /rustc/bcf94dec5ba6838e435902120c0384c360126a26/library\std\src\sys\pal\windows\thread.rs:52 107: 0x7ffd51ae7344 - BaseThreadInitThunk 108: 0x7ffd51c226b1 - RtlUserThreadStart rustc version: 1.81.0-nightly (bcf94dec5 2024-06-23) platform: x86_64-pc-windows-msvc query stack during panic: #0 [try_normalize_generic_arg_after_erasing_regions] normalizing `core::option::Option<<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::sources::empty::Empty>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> as core::iter::traits::iterator::Iterator>::Item>` #1 [needs_drop_raw] computing whether `core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::adapters::peekable::Peekable<&mut core::iter::sources::empty::Empty>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` needs drop #2 [resolve_instance] resolving instance `core::ptr::drop_in_place::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` #3 [collect_and_partition_mono_items] collect_and_partition_mono_items end of query stack ```

workingjubilee commented 4 months ago

impressive.

saethlin commented 4 months ago

This regressed in 1.45, from

error[E0275]: overflow evaluating the requirement `&mut std::iter::Empty<Data>: std::iter::Iterator`

And this program has never produced a good error. I've checked back to 1.26 when impl trait in argument position was stabilized.

theemathas commented 4 months ago

I tried to minimize the code to not depend on iterators, and now I've got a different ICE, which seems similar to #122823. (index out of bounds: the len is 0 but the index is 0)

#![allow(unconditional_recursion)]

fn conjure<T>() -> T {
    unimplemented!()
}

struct Thing;
struct Wrap<T>(T);

trait HasItem {
    type Item;
}
impl HasItem for Thing {
    type Item = ();
}
impl<T: HasItem> HasItem for Wrap<T> {
    type Item = T::Item;
}

struct ItemOf<T: HasItem>(T::Item);

fn bad<T: HasItem>() {
    conjure::<ItemOf<Wrap<T>>>();
    bad::<Wrap<T>>();
}

fn main() {
    bad::<Thing>();
}
Error output ``` Compiling playground v0.0.1 (/playground) thread 'rustc' panicked at /rust/deps/ena-0.14.2/src/snapshot_vec.rs:199:10: index out of bounds: the len is 0 but the index is 0 stack backtrace: 0: 0x7f6c507f5035 - std::backtrace_rs::backtrace::libunwind::trace::h1a07e5dba0da0cd2 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5 1: 0x7f6c507f5035 - std::backtrace_rs::backtrace::trace_unsynchronized::h61b9b8394328c0bc at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f6c507f5035 - std::sys_common::backtrace::_print_fmt::h1c5e18b460934cff at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:68:5 3: 0x7f6c507f5035 - ::fmt::h1e1a1972118942ad at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f6c5084429b - core::fmt::rt::Argument::fmt::h07af2b4071d536cd at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/rt.rs:165:63 5: 0x7f6c5084429b - core::fmt::write::hc090a2ffd6b28c4a at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/mod.rs:1157:21 6: 0x7f6c507e9bdf - std::io::Write::write_fmt::h8898bac6ff039a23 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/io/mod.rs:1832:15 7: 0x7f6c507f4e0e - std::sys_common::backtrace::_print::h4e80c5803d4ee35b at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:47:5 8: 0x7f6c507f4e0e - std::sys_common::backtrace::print::ha96650907276675e at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:34:9 9: 0x7f6c507f7779 - std::panicking::default_hook::{{closure}}::h215c2a0a8346e0e0 10: 0x7f6c507f74bd - std::panicking::default_hook::h207342be97478370 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:298:9 11: 0x7f6c536f21b7 - std[3c8ba8ebcf555201]::panicking::update_hook::>::{closure#0} 12: 0x7f6c507f7e76 - as core::ops::function::Fn>::call::ha9c3bc81d312fd83 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2036:9 13: 0x7f6c507f7e76 - std::panicking::rust_panic_with_hook::hac8bdceee1e4fe2c at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:799:13 14: 0x7f6c507f7c24 - std::panicking::begin_panic_handler::{{closure}}::h00d785e82757ce3c at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:664:13 15: 0x7f6c507f54f9 - std::sys_common::backtrace::__rust_end_short_backtrace::h1628d957bcd06996 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:171:18 16: 0x7f6c507f7957 - rust_begin_unwind at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5 17: 0x7f6c50840763 - core::panicking::panic_fmt::hdc63834ffaaefae5 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14 18: 0x7f6c50840987 - core::panicking::panic_bounds_check::hd7e618b1b39cc1c3 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:275:5 19: 0x7f6c55b7f768 - >, &mut rustc_infer[abd41066181445be]::infer::snapshot::undo_log::InferCtxtUndoLogs>>>::uninlined_get_root_key.llvm.6537034541696690420.cold 20: 0x7f6c518c0045 - >::fold_ty 21: 0x7f6c54ef6b38 - >::try_fold_predicate 22: 0x7f6c5227701f - rustc_trait_selection[173dcaf5d960508e]::traits::type_known_to_meet_bound_modulo_regions 23: 0x7f6c54cc840b - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::> 24: 0x7f6c54cc93c6 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 25: 0x7f6c54cc90ce - rustc_query_impl[a12402620de91e8]::query_impl::is_copy_raw::get_query_non_incr::__rust_end_short_backtrace 26: 0x7f6c54cca0eb - rustc_ty_utils[b79b74a9f824867d]::needs_drop::needs_drop_raw 27: 0x7f6c54cc9b59 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::> 28: 0x7f6c54cc936a - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 29: 0x7f6c54cc900e - rustc_query_impl[a12402620de91e8]::query_impl::needs_drop_raw::get_query_non_incr::__rust_end_short_backtrace 30: 0x7f6c5206c26f - rustc_ty_utils[b79b74a9f824867d]::instance::resolve_instance 31: 0x7f6c54d0fa69 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::> 32: 0x7f6c54d0fd5b - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::)>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 32usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 33: 0x7f6c54d0f9ef - rustc_query_impl[a12402620de91e8]::query_impl::resolve_instance::get_query_non_incr::__rust_end_short_backtrace 34: 0x7f6c54d117a2 - ::resolve_drop_in_place 35: 0x7f6c52c60d93 - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec::{closure#0} 36: 0x7f6c5573d99b - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 37: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 38: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 39: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 40: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 41: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 42: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 43: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 44: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 45: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 46: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 47: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 48: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 49: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 50: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 51: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 52: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 53: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 54: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 55: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 56: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 57: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 58: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 59: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 60: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 61: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 62: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 63: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 64: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 65: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 66: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 67: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 68: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 69: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 70: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 71: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 72: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 73: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 74: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 75: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 76: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 77: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 78: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 79: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 80: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 81: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 82: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 83: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 84: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 85: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 86: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 87: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 88: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 89: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 90: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 91: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 92: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 93: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 94: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 95: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 96: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 97: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 98: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 99: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 100: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 101: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 102: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 103: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 104: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 105: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 106: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 107: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 108: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 109: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 110: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 111: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 112: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 113: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 114: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 115: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 116: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 117: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 118: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 119: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 120: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 121: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 122: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 123: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 124: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 125: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 126: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 127: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 128: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 129: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 130: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 131: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 132: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 133: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 134: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 135: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 136: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 137: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 138: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 139: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 140: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 141: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 142: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 143: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 144: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 145: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 146: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 147: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 148: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 149: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 150: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 151: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 152: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 153: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 154: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 155: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 156: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 157: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 158: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 159: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 160: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 161: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 162: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 163: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 164: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 165: 0x7f6c5573e3cf - rustc_monomorphize[a1d059b428f59f61]::collector::collect_items_rec 166: 0x7f6c55735981 - rustc_monomorphize[a1d059b428f59f61]::partitioning::collect_and_partition_mono_items 167: 0x7f6c55734d56 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::> 168: 0x7f6c55734d1f - >::call_once 169: 0x7f6c55749dfd - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 170: 0x7f6c55749b45 - rustc_query_impl[a12402620de91e8]::query_impl::collect_and_partition_mono_items::get_query_non_incr::__rust_end_short_backtrace 171: 0x7f6c558cac4b - ::codegen_crate 172: 0x7f6c5589a345 - rustc_interface[640972162e3c086f]::passes::start_codegen 173: 0x7f6c55899ad8 - ::codegen_and_build_linker 174: 0x7f6c555ec1be - rustc_interface[640972162e3c086f]::interface::run_compiler::, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1} 175: 0x7f6c555a9f8b - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>> 176: 0x7f6c555a9d80 - <::spawn_unchecked_, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#2} as core[868bc93c3f2beb33]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 177: 0x7f6c50801cab - as core::ops::function::FnOnce>::call_once::h09e5a4c541afa800 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9 178: 0x7f6c50801cab - as core::ops::function::FnOnce>::call_once::h9c8b03c22f4e7026 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9 179: 0x7f6c50801cab - std::sys::pal::unix::thread::Thread::new::thread_start::h522bc89a54da820a at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys/pal/unix/thread.rs:108:17 180: 0x7f6c5070f609 - start_thread 181: 0x7f6c50632353 - clone 182: 0x0 - error: 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.79.0 (129f3b996 2024-06-10) running on x86_64-unknown-linux-gnu note: compiler flags: --crate-type bin -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [is_copy_raw] computing whether `_` is `Copy` #1 [needs_drop_raw] computing whether `ItemOf>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` needs drop #2 [resolve_instance] resolving instance `core::ptr::drop_in_place::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` #3 [collect_and_partition_mono_items] collect_and_partition_mono_items end of query stack error: could not compile `playground` (bin "playground") ```
matthiaskrgr commented 4 months ago

duplicate of https://github.com/rust-lang/rust/issues/118590#issuecomment-1872331728