Repository: rust
Issue: ICE: `layout mismatch for result of MulWithOverflow`
Labels: I-ICE,T-compiler,C-bug,A-layout,F-generic_const_exprs,S-has-mcve,S-bug-has-test,requires-incomplete-features

<!--
[31mICE[0m: Rustc ./7006968D17848963445B4687F8218B26FC998A4987FE78C8CF35FDB056CEB55D.rs '' 'assertion `left == right` failed: layout mismatch for result of MulWithOverflow   '  left: TyAndLayout { ty: (i64, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, true), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }' ' right: TyAndLayout { ty: (usize, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, false), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }'', 'assertion `left == right` failed: layout mismatch for result of MulWithOverflow   '  left: TyAndLayout { ty: (i64, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, true), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }' ' right: TyAndLayout { ty: (usize, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, false), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }''
File: /tmp/im/7006968D17848963445B4687F8218B26FC998A4987FE78C8CF35FDB056CEB55D.rs
-->

snippet:
````rust
#![feature(generic_const_exprs)]

struct Outer<const A: i64, const B: i64>();
impl<const A: usize, const B: usize> Outer<A, B>
where
    [(); A + (B * 2)]:,
{
    fn i() -> Self {
        Self
    }
}

fn main() {
    Outer::<1, 1>::o();
}


````

Version information
````
rustc 1.80.0-nightly (32a3ed229 2024-05-30)
binary: rustc
commit-hash: 32a3ed229caaaa6476ee1b0e644dd53579454536
commit-date: 2024-05-30
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6

````

Command:
`/home/matthias/.rustup/toolchains/master/bin/rustc `

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Program output</strong></summary>
<p>

```
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
  = note: `#[warn(incomplete_features)]` on by default

error: the constant `A` is not of type `i64`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:4:38
  |
4 | impl<const A: usize, const B: usize> Outer<A, B>
  |                                      ^^^^^^^^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:3:14
  |
3 | struct Outer<const A: i64, const B: i64>();
  |              ^^^^^^^^^^^^ required by this bound in `Outer`

error: the constant `B` is not of type `i64`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:4:38
  |
4 | impl<const A: usize, const B: usize> Outer<A, B>
  |                                      ^^^^^^^^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:3:28
  |
3 | struct Outer<const A: i64, const B: i64>();
  |                            ^^^^^^^^^^^^ required by this bound in `Outer`

error: the constant `A` is not of type `i64`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:8:15
  |
8 |     fn i() -> Self {
  |               ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:3:14
  |
3 | struct Outer<const A: i64, const B: i64>();
  |              ^^^^^^^^^^^^ required by this bound in `Outer`

error: the constant `B` is not of type `i64`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:8:15
  |
8 |     fn i() -> Self {
  |               ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:3:28
  |
3 | struct Outer<const A: i64, const B: i64>();
  |                            ^^^^^^^^^^^^ required by this bound in `Outer`

error[E0308]: mismatched types
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:9:9
  |
3 | struct Outer<const A: i64, const B: i64>();
  | ---------------------------------------- `Outer` defines a struct constructor here, which should be called
...
8 |     fn i() -> Self {
  |               ---- expected `Outer<A, B>` because of return type
9 |         Self
  |         ^^^^ expected `Outer<A, B>`, found struct constructor
  |
  = note:          expected struct `Outer<A, B>`
          found struct constructor `fn() -> Outer<A, B> {Outer::<A, B>}`
help: use parentheses to construct this tuple struct
  |
9 |         Self()
  |             ++

error: the constant `A` is not of type `i64`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:9:9
  |
9 |         Self
  |         ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:3:14
  |
3 | struct Outer<const A: i64, const B: i64>();
  |              ^^^^^^^^^^^^ required by this bound in `Outer`

error: the constant `B` is not of type `i64`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:9:9
  |
9 |         Self
  |         ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:3:28
  |
3 | struct Outer<const A: i64, const B: i64>();
  |                            ^^^^^^^^^^^^ required by this bound in `Outer`

thread 'rustc' panicked at compiler/rustc_const_eval/src/interpret/step.rs:172:17:
assertion `left == right` failed: layout mismatch for result of MulWithOverflow
  left: TyAndLayout { ty: (i64, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, true), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }
 right: TyAndLayout { ty: (usize, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, false), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }
stack backtrace:
   0:     0x778b941d5cc5 - std::backtrace_rs::backtrace::libunwind::trace::h678682a49ad9b996
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x778b941d5cc5 - std::backtrace_rs::backtrace::trace_unsynchronized::hee6fa95bb2553111
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x778b941d5cc5 - std::sys_common::backtrace::_print_fmt::h95e0b5b079a7d050
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x778b941d5cc5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5ef0519e3348f4b3
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x778b942266bb - core::fmt::rt::Argument::fmt::h351d794db9ebf8d4
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/core/src/fmt/rt.rs:165:63
   5:     0x778b942266bb - core::fmt::write::hf6a10f4e291514d0
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/core/src/fmt/mod.rs:1168:21
   6:     0x778b941ca99f - std::io::Write::write_fmt::h3774e539b39c6176
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/io/mod.rs:1835:15
   7:     0x778b941d5a9e - std::sys_common::backtrace::_print::h0766b9d4e4e1a2a5
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x778b941d5a9e - std::sys_common::backtrace::print::hf85a15b68fc127ec
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x778b941d84d9 - std::panicking::default_hook::{{closure}}::hba9aa02e8bae00f0
  10:     0x778b941d827a - std::panicking::default_hook::h1795c37d9b50a345
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/panicking.rs:298:9
  11:     0x778b90940d00 - std[fbc7945dfe4e847c]::panicking::update_hook::<alloc[648a2435367f9e21]::boxed::Box<rustc_driver_impl[4c120566f3914dcc]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x778b941d8c0b - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hb26c638276518655
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/alloc/src/boxed.rs:2077:9
  13:     0x778b941d8c0b - std::panicking::rust_panic_with_hook::h9450536fa6827029
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/panicking.rs:799:13
  14:     0x778b941d8984 - std::panicking::begin_panic_handler::{{closure}}::ha4d0dbca7355d76a
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/panicking.rs:664:13
  15:     0x778b941d6189 - std::sys_common::backtrace::__rust_end_short_backtrace::h20e49e7e3e79da68
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x778b941d86b7 - rust_begin_unwind
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/panicking.rs:652:5
  17:     0x778b94222c53 - core::panicking::panic_fmt::h731c162467d8bd18
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/core/src/panicking.rs:72:14
  18:     0x778b9422324f - core::panicking::assert_failed_inner::h6f0656104af613d4
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/core/src/panicking.rs:403:23
  19:     0x778b908b74a3 - core[6d46e2ae36dee942]::panicking::assert_failed::<rustc_target[2bf76cb8f83944e7]::abi::TyAndLayout<rustc_middle[be94168a967605d5]::ty::Ty>, rustc_target[2bf76cb8f83944e7]::abi::TyAndLayout<rustc_middle[be94168a967605d5]::ty::Ty>>
  20:     0x778b928a58f3 - <rustc_const_eval[d725f5dd974c28ec]::interpret::eval_context::InterpCx<rustc_const_eval[d725f5dd974c28ec]::const_eval::machine::CompileTimeInterpreter>>::eval_rvalue_into_place
  21:     0x778b8fd37a4d - rustc_const_eval[d725f5dd974c28ec]::const_eval::eval_queries::eval_to_allocation_raw_provider
  22:     0x778b923b763c - rustc_query_impl[c0e0181520bdf354]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c0e0181520bdf354]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 24usize]>>
  23:     0x778b923b6e59 - rustc_query_system[a635211d769013fd]::query::plumbing::try_execute_query::<rustc_query_impl[c0e0181520bdf354]::DynamicConfig<rustc_query_system[a635211d769013fd]::query::caches::DefaultCache<rustc_middle[be94168a967605d5]::ty::ParamEnvAnd<rustc_middle[be94168a967605d5]::mir::interpret::GlobalId>, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[c0e0181520bdf354]::plumbing::QueryCtxt, false>
  24:     0x778b923b6a30 - rustc_query_impl[c0e0181520bdf354]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  25:     0x778b92b6aaf6 - rustc_middle[be94168a967605d5]::query::plumbing::query_get_at::<rustc_query_system[a635211d769013fd]::query::caches::DefaultCache<rustc_middle[be94168a967605d5]::ty::ParamEnvAnd<rustc_middle[be94168a967605d5]::mir::interpret::GlobalId>, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 24usize]>>>
  26:     0x778b92b6adb5 - rustc_const_eval[d725f5dd974c28ec]::const_eval::valtrees::eval_to_valtree
  27:     0x778b92b6ad49 - <rustc_const_eval[d725f5dd974c28ec]::provide::{closure#0} as core[6d46e2ae36dee942]::ops::function::FnOnce<(rustc_middle[be94168a967605d5]::ty::context::TyCtxt, rustc_middle[be94168a967605d5]::ty::ParamEnvAnd<rustc_middle[be94168a967605d5]::mir::interpret::GlobalId>)>>::call_once
  28:     0x778b92b6ad00 - rustc_query_impl[c0e0181520bdf354]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c0e0181520bdf354]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 24usize]>>
  29:     0x778b92b6acc1 - <rustc_query_impl[c0e0181520bdf354]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[6d46e2ae36dee942]::ops::function::FnOnce<(rustc_middle[be94168a967605d5]::ty::context::TyCtxt, rustc_middle[be94168a967605d5]::ty::ParamEnvAnd<rustc_middle[be94168a967605d5]::mir::interpret::GlobalId>)>>::call_once
  30:     0x778b923b6f34 - rustc_query_system[a635211d769013fd]::query::plumbing::try_execute_query::<rustc_query_impl[c0e0181520bdf354]::DynamicConfig<rustc_query_system[a635211d769013fd]::query::caches::DefaultCache<rustc_middle[be94168a967605d5]::ty::ParamEnvAnd<rustc_middle[be94168a967605d5]::mir::interpret::GlobalId>, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[c0e0181520bdf354]::plumbing::QueryCtxt, false>
  31:     0x778b923b6858 - rustc_query_impl[c0e0181520bdf354]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  32:     0x778b927c86f1 - rustc_middle[be94168a967605d5]::query::plumbing::query_get_at::<rustc_query_system[a635211d769013fd]::query::caches::DefaultCache<rustc_middle[be94168a967605d5]::ty::ParamEnvAnd<rustc_middle[be94168a967605d5]::mir::interpret::GlobalId>, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 24usize]>>>
  33:     0x778b928e0bf3 - <rustc_middle[be94168a967605d5]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  34:     0x778b928e11c2 - <rustc_middle[be94168a967605d5]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  35:     0x778b90ca0162 - <rustc_infer[94dcf74a7bd108a5]::infer::InferCtxt>::const_eval_resolve
  36:     0x778b936bde47 - rustc_trait_selection[294db240007bd44b]::traits::const_evaluatable::is_const_evaluatable.cold
  37:     0x778b8e8eb8d3 - <rustc_trait_selection[294db240007bd44b]::traits::fulfill::FulfillProcessor as rustc_data_structures[db4c5959faeb11bb]::obligation_forest::ObligationProcessor>::process_obligation
  38:     0x778b91e05cf6 - <rustc_data_structures[db4c5959faeb11bb]::obligation_forest::ObligationForest<rustc_trait_selection[294db240007bd44b]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[294db240007bd44b]::traits::fulfill::FulfillProcessor>
  39:     0x778b9221176b - <core[6d46e2ae36dee942]::iter::adapters::filter::Filter<core[6d46e2ae36dee942]::iter::adapters::map::Map<core[6d46e2ae36dee942]::slice::iter::Iter<rustc_hir_typeck[27bfc99261d6777a]::method::probe::Candidate>, <rustc_hir_typeck[27bfc99261d6777a]::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck[27bfc99261d6777a]::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core[6d46e2ae36dee942]::iter::traits::iterator::Iterator>::next
  40:     0x778b9220d220 - <rustc_hir_typeck[27bfc99261d6777a]::method::probe::ProbeContext>::pick_all_method
  41:     0x778b90b80290 - <rustc_hir_typeck[27bfc99261d6777a]::method::probe::ProbeContext>::pick_core
  42:     0x778b90b19c25 - <core[6d46e2ae36dee942]::iter::adapters::filter_map::FilterMap<core[6d46e2ae36dee942]::slice::iter::Iter<rustc_span[41e37a1bb73e38bc]::symbol::Ident>, <rustc_hir_typeck[27bfc99261d6777a]::method::probe::ProbeContext>::probe_for_similar_candidate::{closure#0}::{closure#1}> as core[6d46e2ae36dee942]::iter::traits::iterator::Iterator>::next
  43:     0x778b90b81afa - <rustc_hir_typeck[27bfc99261d6777a]::method::probe::ProbeContext>::probe_for_similar_candidate
  44:     0x778b9283dacc - <rustc_hir_typeck[27bfc99261d6777a]::fn_ctxt::FnCtxt>::probe_for_name
  45:     0x778b92846267 - <rustc_hir_typeck[27bfc99261d6777a]::fn_ctxt::FnCtxt>::check_expr_path
  46:     0x778b927e8e0a - <rustc_hir_typeck[27bfc99261d6777a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  47:     0x778b927e9c47 - <rustc_hir_typeck[27bfc99261d6777a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  48:     0x778b927e57f3 - <rustc_hir_typeck[27bfc99261d6777a]::fn_ctxt::FnCtxt>::check_block_with_expected
  49:     0x778b927ea937 - <rustc_hir_typeck[27bfc99261d6777a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  50:     0x778b9219e0d4 - rustc_hir_typeck[27bfc99261d6777a]::check::check_fn
  51:     0x778b9219386c - rustc_hir_typeck[27bfc99261d6777a]::typeck
  52:     0x778b921932d1 - rustc_query_impl[c0e0181520bdf354]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c0e0181520bdf354]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 8usize]>>
  53:     0x778b9205a86e - rustc_query_system[a635211d769013fd]::query::plumbing::try_execute_query::<rustc_query_impl[c0e0181520bdf354]::DynamicConfig<rustc_query_system[a635211d769013fd]::query::caches::VecCache<rustc_span[41e37a1bb73e38bc]::def_id::LocalDefId, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c0e0181520bdf354]::plumbing::QueryCtxt, false>
  54:     0x778b92059395 - rustc_query_impl[c0e0181520bdf354]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  55:     0x778b92058fcb - <rustc_middle[be94168a967605d5]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[9feabfd3ed563fae]::check_crate::{closure#4}>::{closure#0}
  56:     0x778b92057a8b - rustc_hir_analysis[9feabfd3ed563fae]::check_crate
  57:     0x778b928275fe - rustc_interface[c870be2efde3492c]::passes::analysis
  58:     0x778b9282715b - rustc_query_impl[c0e0181520bdf354]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c0e0181520bdf354]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 1usize]>>
  59:     0x778b92b8f725 - rustc_query_system[a635211d769013fd]::query::plumbing::try_execute_query::<rustc_query_impl[c0e0181520bdf354]::DynamicConfig<rustc_query_system[a635211d769013fd]::query::caches::SingleCache<rustc_middle[be94168a967605d5]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[c0e0181520bdf354]::plumbing::QueryCtxt, false>
  60:     0x778b92b8f48f - rustc_query_impl[c0e0181520bdf354]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  61:     0x778b92a2120e - rustc_interface[c870be2efde3492c]::interface::run_compiler::<core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>, rustc_driver_impl[4c120566f3914dcc]::run_compiler::{closure#0}>::{closure#1}
  62:     0x778b929e23c9 - std[fbc7945dfe4e847c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c870be2efde3492c]::util::run_in_thread_with_globals<rustc_interface[c870be2efde3492c]::util::run_in_thread_pool_with_globals<rustc_interface[c870be2efde3492c]::interface::run_compiler<core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>, rustc_driver_impl[4c120566f3914dcc]::run_compiler::{closure#0}>::{closure#1}, core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>>::{closure#0}, core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>>
  63:     0x778b929e2172 - <<std[fbc7945dfe4e847c]::thread::Builder>::spawn_unchecked_<rustc_interface[c870be2efde3492c]::util::run_in_thread_with_globals<rustc_interface[c870be2efde3492c]::util::run_in_thread_pool_with_globals<rustc_interface[c870be2efde3492c]::interface::run_compiler<core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>, rustc_driver_impl[4c120566f3914dcc]::run_compiler::{closure#0}>::{closure#1}, core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>>::{closure#0}, core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[6d46e2ae36dee942]::result::Result<(), rustc_span[41e37a1bb73e38bc]::ErrorGuaranteed>>::{closure#2} as core[6d46e2ae36dee942]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  64:     0x778b941e2bfb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5d22407a994a8dd7
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/alloc/src/boxed.rs:2063:9
  65:     0x778b941e2bfb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he08091f4f7e587cf
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/alloc/src/boxed.rs:2063:9
  66:     0x778b941e2bfb - std::sys::pal::unix::thread::Thread::new::thread_start::h4ffcec4576023b2b
                               at /rustc/32a3ed229caaaa6476ee1b0e644dd53579454536/library/std/src/sys/pal/unix/thread.rs:108:17
  67:     0x778b8d6aa1cf - <unknown>
  68:     0x778b8d72b6ec - <unknown>
  69:                0x0 - <unknown>

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: please make sure that you have updated to the latest nightly

note: rustc 1.80.0-nightly (32a3ed229 2024-05-30) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:4:1: 6:24>::{constant#0}`
#1 [eval_to_valtree] evaluating type-level constant
end of query stack
error: aborting due to 7 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0308`.

```

</p>
</details>

<!--
query stack:
  left: TyAndLayout { ty: (i64, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, true), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }
 right: TyAndLayout { ty: (usize, bool), layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I64, false), valid_range: 0..=18446744073709551615 }, Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes)], memory_index: [0, 1] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }
#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at /tmp/icemaker_global_tempdir.xEoM7KSB6Agf/rustc_testrunner_tmpdir_reporting.hKrmBMgX97mb/mvce.rs:4:1: 6:24>::{constant#0}`
#1 [eval_to_valtree] evaluating type-level constant

-->
@rustbot label +F-generic_const_exprs