Skip to content

ICE: only 'variances_of' returns '&[ty::Variance]' #127971

Open
@matthiaskrgr

Description

@matthiaskrgr

Code

may need a couple for -Zthreads=16 runs to trigger

use std::fmt::Debug;

fn elided(_: &impl Copy + 'a) -> _ { x }

fn foo<'a>(_: &impl Copy + 'a) -> impl 'b + 'a { x }

fn x<'b>(_: &'a impl Copy + 'a) -> Box<dyn 'b> { Box::u32(x) }

fn main() {}

Meta

rustc --version --verbose:

rustc 1.81.0-nightly (11e57241f 2024-07-19)
binary: rustc
commit-hash: 11e57241f166194a328438d9264b68c98a18d51f
commit-date: 2024-07-19
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7

Error output


Backtrace

error: ambiguous `+` in a type
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:3:15
  |
3 | fn elided(_: &impl Copy + 'a) -> _ { x }
  |               ^^^^^^^^^^^^^^
  |
help: try adding parentheses
  |
3 | fn elided(_: &(impl Copy + 'a)) -> _ { x }
  |               +              +

error: ambiguous `+` in a type
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:5:16
  |
5 | fn foo<'a>(_: &impl Copy + 'a) -> impl 'b + 'a { x }
  |                ^^^^^^^^^^^^^^
  |
help: try adding parentheses
  |
5 | fn foo<'a>(_: &(impl Copy + 'a)) -> impl 'b + 'a { x }
  |                +              +

error: ambiguous `+` in a type
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:7:17
  |
7 | fn x<'b>(_: &'a impl Copy + 'a) -> Box<dyn 'b> { Box::u32(x) }
  |                 ^^^^^^^^^^^^^^
  |
help: try adding parentheses
  |
7 | fn x<'b>(_: &'a (impl Copy + 'a)) -> Box<dyn 'b> { Box::u32(x) }
  |                 +              +

error: at least one trait must be specified
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:5:35
  |
5 | fn foo<'a>(_: &impl Copy + 'a) -> impl 'b + 'a { x }
  |                                   ^^^^^^^^^^^^

error[E0261]: use of undeclared lifetime name `'a`
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:3:27
  |
3 | fn elided(_: &impl Copy + 'a) -> _ { x }
  |          -                ^^ undeclared lifetime
  |          |
  |          help: consider introducing lifetime `'a` here: `<'a>`

error[E0261]: use of undeclared lifetime name `'b`
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:5:40
  |
5 | fn foo<'a>(_: &impl Copy + 'a) -> impl 'b + 'a { x }
  |        -                               ^^ undeclared lifetime
  |        |
  |        help: consider introducing lifetime `'b` here: `'b,`

error[E0261]: use of undeclared lifetime name `'a`
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:7:14
  |
7 | fn x<'b>(_: &'a impl Copy + 'a) -> Box<dyn 'b> { Box::u32(x) }
  |      -       ^^ undeclared lifetime
  |      |
  |      help: consider introducing lifetime `'a` here: `'a,`

error[E0261]: use of undeclared lifetime name `'a`
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:7:29
  |
7 | fn x<'b>(_: &'a impl Copy + 'a) -> Box<dyn 'b> { Box::u32(x) }
  |      -                      ^^ undeclared lifetime
  |      |
  |      help: consider introducing lifetime `'a` here: `'a,`

warning: unused import: `std::fmt::Debug`
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:1:5
  |
1 | use std::fmt::Debug;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0224]: at least one trait is required for an object type
 --> 74dbc2bdbec819871a3224ebeda37b82e2a3a4aa.rs:7:40
  |
7 | fn x<'b>(_: &'a impl Copy + 'a) -> Box<dyn 'b> { Box::u32(x) }
  |                                        ^^^^^^

error: internal compiler error: compiler/rustc_middle/src/values.rs:147:13: only `variances_of` returns `&[ty::Variance]`

thread 'rustc' panicked at compiler/rustc_middle/src/values.rs:147:13:
Box<dyn Any>
stack backtrace:
   0:     0x7edcca19f125 - std::backtrace_rs::backtrace::libunwind::trace::hf98a5915ebb35e48
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7edcca19f125 - std::backtrace_rs::backtrace::trace_unsynchronized::hd655af97e2fd6730
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7edcca19f125 - std::sys::backtrace::_print_fmt::h621db2f84bb6c977
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/sys/backtrace.rs:65:5
   3:     0x7edcca19f125 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h15411039d8520454
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/sys/backtrace.rs:40:26
   4:     0x7edcca1eec2b - core::fmt::rt::Argument::fmt::h67bd01cd3519872c
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/core/src/fmt/rt.rs:173:76
   5:     0x7edcca1eec2b - core::fmt::write::hadd1ce33df102529
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/core/src/fmt/mod.rs:1182:21
   6:     0x7edcca193bff - std::io::Write::write_fmt::h2f869538ed52830c
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/io/mod.rs:1827:15
   7:     0x7edcca1a1911 - std::sys::backtrace::BacktraceLock::print::hbc3230efeae1e486
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/sys/backtrace.rs:43:9
   8:     0x7edcca1a1911 - std::panicking::default_hook::{{closure}}::h218c8d9fd7d09778
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/panicking.rs:269:22
   9:     0x7edcca1a15ec - std::panicking::default_hook::hb07cda98c1c69610
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/panicking.rs:296:9
  10:     0x7edcc662d86a - std[6b173760e3c5fb6]::panicking::update_hook::<alloc[90d8a7b433d20df0]::boxed::Box<rustc_driver_impl[25cb91e50f1896ac]::install_ice_hook::{closure#0}>>::{closure#0}
  11:     0x7edcca1a22df - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h47aca6625104f576
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/alloc/src/boxed.rs:2084:9
  12:     0x7edcca1a22df - std::panicking::rust_panic_with_hook::h4eb1d6a88426bb57
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/panicking.rs:808:13
  13:     0x7edcc6668121 - std[6b173760e3c5fb6]::panicking::begin_panic::<rustc_errors[8a52d81e420a7663]::ExplicitBug>::{closure#0}
  14:     0x7edcc665af26 - std[6b173760e3c5fb6]::sys::backtrace::__rust_end_short_backtrace::<std[6b173760e3c5fb6]::panicking::begin_panic<rustc_errors[8a52d81e420a7663]::ExplicitBug>::{closure#0}, !>
  15:     0x7edcc665aed6 - std[6b173760e3c5fb6]::panicking::begin_panic::<rustc_errors[8a52d81e420a7663]::ExplicitBug>
  16:     0x7edcc66715a1 - <rustc_errors[8a52d81e420a7663]::diagnostic::BugAbort as rustc_errors[8a52d81e420a7663]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  17:     0x7edcc6be920d - <rustc_errors[8a52d81e420a7663]::DiagCtxtHandle>::span_bug::<rustc_span[bca8f273264d3c53]::span_encoding::Span, alloc[90d8a7b433d20df0]::string::String>
  18:     0x7edcc6c879b8 - rustc_middle[d4947050f46ff72a]::util::bug::opt_span_bug_fmt::<rustc_span[bca8f273264d3c53]::span_encoding::Span>::{closure#0}
  19:     0x7edcc6c6db7a - rustc_middle[d4947050f46ff72a]::ty::context::tls::with_opt::<rustc_middle[d4947050f46ff72a]::util::bug::opt_span_bug_fmt<rustc_span[bca8f273264d3c53]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  20:     0x7edcc6c6d9fb - rustc_middle[d4947050f46ff72a]::ty::context::tls::with_context_opt::<rustc_middle[d4947050f46ff72a]::ty::context::tls::with_opt<rustc_middle[d4947050f46ff72a]::util::bug::opt_span_bug_fmt<rustc_span[bca8f273264d3c53]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  21:     0x7edcc6c878e7 - rustc_middle[d4947050f46ff72a]::util::bug::span_bug_fmt::<rustc_span[bca8f273264d3c53]::span_encoding::Span>
  22:     0x7edcc6c8950c - <&[rustc_type_ir[f96864cd1999cfdb]::Variance] as rustc_query_system[5fd7963a6e62591]::values::Value<rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt>>::from_cycle_error
  23:     0x7edcc7024b30 - <rustc_query_impl[dfa85d359d8bf55f]::query_impl::variances_of::dynamic_query::{closure#3} as core[9625cf1cb95ebe7c]::ops::function::FnOnce<(rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt, &rustc_query_system[5fd7963a6e62591]::query::plumbing::CycleError, rustc_span[bca8f273264d3c53]::ErrorGuaranteed)>>::call_once
  24:     0x7edcc6fb9ce5 - rustc_query_system[5fd7963a6e62591]::query::plumbing::mk_cycle::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt>
  25:     0x7edcc7ff9cab - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  26:     0x7edcc7ff90f1 - rustc_query_impl[dfa85d359d8bf55f]::query_impl::variances_of::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7edcc89771f1 - rustc_middle[d4947050f46ff72a]::query::plumbing::query_get_at::<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 16usize]>>>
  28:     0x7edcc7cddabe - rustc_type_ir[f96864cd1999cfdb]::relate::structurally_relate_tys::<rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt, rustc_infer[6bf7ce60c05bfbd2]::infer::relate::generalize::Generalizer>::{closure#0}
  29:     0x7edcc7cd6854 - <rustc_infer[6bf7ce60c05bfbd2]::infer::relate::generalize::Generalizer as rustc_type_ir[f96864cd1999cfdb]::relate::TypeRelation<rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt>>::tys::{closure#0}
  30:     0x7edcc7cc85f2 - <rustc_infer[6bf7ce60c05bfbd2]::infer::relate::type_relating::TypeRelating as rustc_type_ir[f96864cd1999cfdb]::relate::TypeRelation<rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt>>::tys
  31:     0x7edcc87aa5cf - <rustc_hir_typeck[3d0bcd2c694d45c9]::coercion::Coerce>::unify_and::<rustc_hir_typeck[3d0bcd2c694d45c9]::coercion::identity>
  32:     0x7edcc7cbfb80 - <rustc_hir_typeck[3d0bcd2c694d45c9]::fn_ctxt::FnCtxt>::coerce
  33:     0x7edcc87839b0 - <rustc_hir_typeck[3d0bcd2c694d45c9]::fn_ctxt::FnCtxt>::check_block_with_expected
  34:     0x7edcc878951d - <rustc_hir_typeck[3d0bcd2c694d45c9]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  35:     0x7edcc7fb74cf - rustc_hir_typeck[3d0bcd2c694d45c9]::check::check_fn
  36:     0x7edcc8607381 - rustc_hir_typeck[3d0bcd2c694d45c9]::typeck
  37:     0x7edcc8606d1d - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>
  38:     0x7edcc7fd8ab3 - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::VecCache<rustc_span[bca8f273264d3c53]::def_id::LocalDefId, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  39:     0x7edcc7fd7c8d - rustc_query_impl[dfa85d359d8bf55f]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  40:     0x7edcc83c2733 - rustc_middle[d4947050f46ff72a]::query::plumbing::query_get_at::<rustc_query_system[5fd7963a6e62591]::query::caches::VecCache<rustc_span[bca8f273264d3c53]::def_id::LocalDefId, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>>
  41:     0x7edcc83c47d3 - rustc_hir_analysis[67f94dc96106c366]::collect::infer_return_ty_for_fn_sig
  42:     0x7edcc83c2fb7 - rustc_hir_analysis[67f94dc96106c366]::collect::fn_sig
  43:     0x7edcc7eb56c5 - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::fn_sig::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 24usize]>>
  44:     0x7edcc7eb847c - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  45:     0x7edcc7eb7ce3 - rustc_query_impl[dfa85d359d8bf55f]::query_impl::fn_sig::get_query_non_incr::__rust_end_short_backtrace
  46:     0x7edcc7eb7c01 - rustc_middle[d4947050f46ff72a]::query::plumbing::query_get_at::<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 24usize]>>>
  47:     0x7edcc874a2ec - <rustc_hir_analysis[67f94dc96106c366]::variance::constraints::ConstraintContext>::build_constraints_for_item
  48:     0x7edcc517317e - rustc_hir_analysis[67f94dc96106c366]::variance::crate_variances
  49:     0x7edcc8ac6bf8 - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::crate_variances::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>
  50:     0x7edcc8ac6142 - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::SingleCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  51:     0x7edcc8ac585e - rustc_query_impl[dfa85d359d8bf55f]::query_impl::crate_variances::get_query_non_incr::__rust_end_short_backtrace
  52:     0x7edcc7ffb419 - rustc_hir_analysis[67f94dc96106c366]::variance::variances_of
  53:     0x7edcc7ffb056 - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::variances_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 16usize]>>
  54:     0x7edcc7ffb02b - <rustc_query_impl[dfa85d359d8bf55f]::query_impl::variances_of::dynamic_query::{closure#2} as core[9625cf1cb95ebe7c]::ops::function::FnOnce<(rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt, rustc_span[bca8f273264d3c53]::def_id::DefId)>>::call_once
  55:     0x7edcc7ff957a - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  56:     0x7edcc7ff90f1 - rustc_query_impl[dfa85d359d8bf55f]::query_impl::variances_of::get_query_non_incr::__rust_end_short_backtrace
  57:     0x7edcc89771f1 - rustc_middle[d4947050f46ff72a]::query::plumbing::query_get_at::<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 16usize]>>>
  58:     0x7edcc7cddabe - rustc_type_ir[f96864cd1999cfdb]::relate::structurally_relate_tys::<rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt, rustc_infer[6bf7ce60c05bfbd2]::infer::relate::generalize::Generalizer>::{closure#0}
  59:     0x7edcc7cd6854 - <rustc_infer[6bf7ce60c05bfbd2]::infer::relate::generalize::Generalizer as rustc_type_ir[f96864cd1999cfdb]::relate::TypeRelation<rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt>>::tys::{closure#0}
  60:     0x7edcc7cc85f2 - <rustc_infer[6bf7ce60c05bfbd2]::infer::relate::type_relating::TypeRelating as rustc_type_ir[f96864cd1999cfdb]::relate::TypeRelation<rustc_middle[d4947050f46ff72a]::ty::context::TyCtxt>>::tys
  61:     0x7edcc87aa5cf - <rustc_hir_typeck[3d0bcd2c694d45c9]::coercion::Coerce>::unify_and::<rustc_hir_typeck[3d0bcd2c694d45c9]::coercion::identity>
  62:     0x7edcc7cbfb80 - <rustc_hir_typeck[3d0bcd2c694d45c9]::fn_ctxt::FnCtxt>::coerce
  63:     0x7edcc87839b0 - <rustc_hir_typeck[3d0bcd2c694d45c9]::fn_ctxt::FnCtxt>::check_block_with_expected
  64:     0x7edcc878951d - <rustc_hir_typeck[3d0bcd2c694d45c9]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  65:     0x7edcc7fb74cf - rustc_hir_typeck[3d0bcd2c694d45c9]::check::check_fn
  66:     0x7edcc8607381 - rustc_hir_typeck[3d0bcd2c694d45c9]::typeck
  67:     0x7edcc8606d1d - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>
  68:     0x7edcc7fd8ab3 - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::VecCache<rustc_span[bca8f273264d3c53]::def_id::LocalDefId, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  69:     0x7edcc7fd7c8d - rustc_query_impl[dfa85d359d8bf55f]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  70:     0x7edcc83c2733 - rustc_middle[d4947050f46ff72a]::query::plumbing::query_get_at::<rustc_query_system[5fd7963a6e62591]::query::caches::VecCache<rustc_span[bca8f273264d3c53]::def_id::LocalDefId, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>>
  71:     0x7edcc8a8222d - rustc_hir_analysis[67f94dc96106c366]::collect::type_of::type_of_opaque
  72:     0x7edcc8a82175 - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>
  73:     0x7edcc7d973e3 - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  74:     0x7edcc8d9ab36 - rustc_query_impl[dfa85d359d8bf55f]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  75:     0x7edcc83b2d80 - rustc_middle[d4947050f46ff72a]::query::plumbing::query_get_at::<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>>
  76:     0x7edcc51a53b2 - rustc_hir_analysis[67f94dc96106c366]::collect::type_of::type_of
  77:     0x7edcc7d986aa - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>
  78:     0x7edcc7d973e3 - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  79:     0x7edcc7d96fa7 - rustc_query_impl[dfa85d359d8bf55f]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  80:     0x7edcc83b2d80 - rustc_middle[d4947050f46ff72a]::query::plumbing::query_get_at::<rustc_query_system[5fd7963a6e62591]::query::caches::DefIdCache<rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 8usize]>>>
  81:     0x7edcc51b3a7e - rustc_hir_analysis[67f94dc96106c366]::check::wfcheck::check_well_formed
  82:     0x7edcc837f1c7 - rustc_query_impl[dfa85d359d8bf55f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dfa85d359d8bf55f]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 1usize]>>
  83:     0x7edcc837f43f - rustc_query_system[5fd7963a6e62591]::query::plumbing::try_execute_query::<rustc_query_impl[dfa85d359d8bf55f]::DynamicConfig<rustc_query_system[5fd7963a6e62591]::query::caches::VecCache<rustc_hir[6b88011788635e50]::hir_id::OwnerId, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[dfa85d359d8bf55f]::plumbing::QueryCtxt, false>
  84:     0x7edcc837f1a0 - rustc_query_impl[dfa85d359d8bf55f]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  85:     0x7edcc837f0fb - rustc_middle[d4947050f46ff72a]::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system[5fd7963a6e62591]::query::caches::VecCache<rustc_hir[6b88011788635e50]::hir_id::OwnerId, rustc_middle[d4947050f46ff72a]::query::erase::Erased<[u8; 1usize]>>, ()>
  86:     0x7edcc6729a5f - rayon[68c277734d7804d6]::iter::plumbing::bridge_producer_consumer::helper::<rayon[68c277734d7804d6]::slice::IterProducer<rustc_hir[6b88011788635e50]::hir::ItemId>, rayon[68c277734d7804d6]::iter::filter_map::FilterMapConsumer<rayon[68c277734d7804d6]::iter::reduce::ReduceConsumer<<core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>>::and<()>, rustc_data_structures[5a1a9a15cf0b303d]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[6b88011788635e50]::hir::ItemId], rustc_span[bca8f273264d3c53]::ErrorGuaranteed, <rustc_middle[d4947050f46ff72a]::hir::ModuleItems>::par_items<rustc_hir_analysis[67f94dc96106c366]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[5a1a9a15cf0b303d]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[6b88011788635e50]::hir::ItemId], rustc_span[bca8f273264d3c53]::ErrorGuaranteed, <rustc_middle[d4947050f46ff72a]::hir::ModuleItems>::par_items<rustc_hir_analysis[67f94dc96106c366]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
  87:     0x7edcc6788032 - <rayon_core[e422279bfe505edd]::job::StackJob<rayon_core[e422279bfe505edd]::latch::SpinLatch, rayon_core[e422279bfe505edd]::join::join_context::call_b<core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>, rayon[68c277734d7804d6]::iter::plumbing::bridge_producer_consumer::helper<rayon[68c277734d7804d6]::slice::IterProducer<rustc_hir[6b88011788635e50]::hir::ItemId>, rayon[68c277734d7804d6]::iter::filter_map::FilterMapConsumer<rayon[68c277734d7804d6]::iter::reduce::ReduceConsumer<<core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>>::and<()>, rustc_data_structures[5a1a9a15cf0b303d]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[6b88011788635e50]::hir::ItemId], rustc_span[bca8f273264d3c53]::ErrorGuaranteed, <rustc_middle[d4947050f46ff72a]::hir::ModuleItems>::par_items<rustc_hir_analysis[67f94dc96106c366]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}>, rustc_data_structures[5a1a9a15cf0b303d]::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir[6b88011788635e50]::hir::ItemId], rustc_span[bca8f273264d3c53]::ErrorGuaranteed, <rustc_middle[d4947050f46ff72a]::hir::ModuleItems>::par_items<rustc_hir_analysis[67f94dc96106c366]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>::{closure#1}>::{closure#0}, core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>> as rayon_core[e422279bfe505edd]::job::Job>::execute
  88:     0x7edcc615c809 - <rayon_core[e422279bfe505edd]::registry::WorkerThread>::wait_until_cold
  89:     0x7edcc6159519 - <rayon_core[e422279bfe505edd]::registry::ThreadBuilder>::run
  90:     0x7edcc662fdf7 - <<crossbeam_utils[36a789838def2c84]::thread::ScopedThreadBuilder>::spawn<<rayon_core[e422279bfe505edd]::ThreadPoolBuilder>::build_scoped<rustc_interface[e83b188aca6a6213]::util::run_in_thread_pool_with_globals<rustc_interface[e83b188aca6a6213]::interface::run_compiler<core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>, rustc_driver_impl[25cb91e50f1896ac]::run_compiler::{closure#0}>::{closure#1}, core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[e83b188aca6a6213]::util::run_in_thread_pool_with_globals<rustc_interface[e83b188aca6a6213]::interface::run_compiler<core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>, rustc_driver_impl[25cb91e50f1896ac]::run_compiler::{closure#0}>::{closure#1}, core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core[9625cf1cb95ebe7c]::result::Result<(), rustc_span[bca8f273264d3c53]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[9625cf1cb95ebe7c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  91:     0x7edcc662317e - std[6b173760e3c5fb6]::sys::backtrace::__rust_begin_short_backtrace::<alloc[90d8a7b433d20df0]::boxed::Box<dyn core[9625cf1cb95ebe7c]::ops::function::FnOnce<(), Output = ()> + core[9625cf1cb95ebe7c]::marker::Send>, ()>
  92:     0x7edcc662faa5 - <<std[6b173760e3c5fb6]::thread::Builder>::spawn_unchecked_<alloc[90d8a7b433d20df0]::boxed::Box<dyn core[9625cf1cb95ebe7c]::ops::function::FnOnce<(), Output = ()> + core[9625cf1cb95ebe7c]::marker::Send>, ()>::{closure#2} as core[9625cf1cb95ebe7c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  93:     0x7edcca1ac33b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd3e0782f209a59bb
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/alloc/src/boxed.rs:2070:9
  94:     0x7edcca1ac33b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2ffe75b9a73fa277
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/alloc/src/boxed.rs:2070:9
  95:     0x7edcca1ac33b - std::sys::pal::unix::thread::Thread::new::thread_start::he38da8e39f41a015
                               at /rustc/11e57241f166194a328438d9264b68c98a18d51f/library/std/src/sys/pal/unix/thread.rs:108:17
  96:     0x7edcc30a6ded - <unknown>
  97:     0x7edcc312a0dc - <unknown>
  98:                0x0 - <unknown>

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/tmp/im/rustc-ice-2024-07-19T16_04_50-2475586.txt` to your bug report

note: compiler flags: -Z threads=16

query stack during panic:
#0 [typeck] type-checking `elided`
#1 [fn_sig] computing function signature of `elided`
end of query stack
error: aborting due to 10 previous errors; 1 warning emitted

Some errors have detailed explanations: E0224, E0261.
For more information about an error, try `rustc --explain E0224`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parallel-compilerArea: parallel compilerC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions