Skip to content

ICE: layout mismatch for result of MulWithOverflow #125520

Closed
@matthiaskrgr

Description

auto-reduced (treereduce-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();
}

original:

#![allow(N)]
#![feature(generic_const_exprs)]
struct Inner<const N: usize, const M: usize>;
impl<const N: usize, const M: usize> Inner<N, M> where [(); N + M]: {
    fn i() -> Self {
        Self
    }
}

struct Outer<const A: i64, const B: i64>(Inner<A, { B * 2 }>) where [(); A + (B * 2)]:;
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 (9e297bf54 2024-05-24)
binary: rustc
commit-hash: 9e297bf54d31eb3b30067208ff9af4416945a2ed
commit-date: 2024-05-24
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /tmp/icemaker_global_tempdir.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/mvce.rs:8:15
  |
8 |     fn i() -> Self {
  |               ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/mvce.rs:8:15
  |
8 |     fn i() -> Self {
  |               ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/mvce.rs:9:9
  |
9 |         Self
  |         ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/mvce.rs:9:9
  |
9 |         Self
  |         ^^^^ expected `i64`, found `usize`
  |
note: required by a bound in `Outer`
 --> /tmp/icemaker_global_tempdir.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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:     0x7d69f1040a15 - std::backtrace_rs::backtrace::libunwind::trace::h01616864447d7b30
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x7d69f1040a15 - std::backtrace_rs::backtrace::trace_unsynchronized::haf2505f1cce46362
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7d69f1040a15 - std::sys_common::backtrace::_print_fmt::h194ca41cc100de5c
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7d69f1040a15 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0cdf3b9de85168c4
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7d69f108faeb - core::fmt::rt::Argument::fmt::h4873b1048d9b82db
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/core/src/fmt/rt.rs:165:63
   5:     0x7d69f108faeb - core::fmt::write::ha4c74c323a0d086c
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/core/src/fmt/mod.rs:1172:21
   6:     0x7d69f103576f - std::io::Write::write_fmt::h294ecab9c2433d17
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/io/mod.rs:1835:15
   7:     0x7d69f10407ee - std::sys_common::backtrace::_print::h667dd447a835cd2b
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7d69f10407ee - std::sys_common::backtrace::print::hd059cf329bebd7b7
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7d69f1043219 - std::panicking::default_hook::{{closure}}::hcda624442cb26ab2
  10:     0x7d69f1042fba - std::panicking::default_hook::h1433a4b0280b10c1
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/panicking.rs:298:9
  11:     0x7d69edb122d0 - std[4333a286c4712977]::panicking::update_hook::<alloc[a099cd952f2fafa7]::boxed::Box<rustc_driver_impl[112c1aa6bb2c54d8]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7d69f104394b - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h7bfd229c9579d378
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/alloc/src/boxed.rs:2077:9
  13:     0x7d69f104394b - std::panicking::rust_panic_with_hook::hbbff73039be21b12
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/panicking.rs:799:13
  14:     0x7d69f10436c4 - std::panicking::begin_panic_handler::{{closure}}::hf2d595805aea6208
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/panicking.rs:664:13
  15:     0x7d69f1040ed9 - std::sys_common::backtrace::__rust_end_short_backtrace::h043134ab1b7436ad
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7d69f10433f7 - rust_begin_unwind
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/panicking.rs:652:5
  17:     0x7d69f108c0b3 - core::panicking::panic_fmt::h5e9d189302ee3459
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/core/src/panicking.rs:72:14
  18:     0x7d69f108c67f - core::panicking::assert_failed_inner::hbb2128a8bf12649f
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/core/src/panicking.rs:403:23
  19:     0x7d69eda7eb93 - core[1cb6646e799f6e04]::panicking::assert_failed::<rustc_target[67726f0d2179d739]::abi::TyAndLayout<rustc_middle[26d2dffd48681262]::ty::Ty>, rustc_target[67726f0d2179d739]::abi::TyAndLayout<rustc_middle[26d2dffd48681262]::ty::Ty>>
  20:     0x7d69ecf375e2 - <rustc_const_eval[7156c5b188f5b7df]::interpret::eval_context::InterpCx<rustc_const_eval[7156c5b188f5b7df]::const_eval::machine::CompileTimeInterpreter>>::eval_rvalue_into_place
  21:     0x7d69ecee012c - rustc_const_eval[7156c5b188f5b7df]::const_eval::eval_queries::eval_to_allocation_raw_provider
  22:     0x7d69ef4f5876 - rustc_query_impl[3d654a2da272ff0b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3d654a2da272ff0b]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 24usize]>>
  23:     0x7d69ef4f5099 - rustc_query_system[a2213591f7f99b46]::query::plumbing::try_execute_query::<rustc_query_impl[3d654a2da272ff0b]::DynamicConfig<rustc_query_system[a2213591f7f99b46]::query::caches::DefaultCache<rustc_middle[26d2dffd48681262]::ty::ParamEnvAnd<rustc_middle[26d2dffd48681262]::mir::interpret::GlobalId>, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[3d654a2da272ff0b]::plumbing::QueryCtxt, false>
  24:     0x7d69ef4f4c70 - rustc_query_impl[3d654a2da272ff0b]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  25:     0x7d69ef4f47d2 - rustc_middle[26d2dffd48681262]::query::plumbing::query_get_at::<rustc_query_system[a2213591f7f99b46]::query::caches::DefaultCache<rustc_middle[26d2dffd48681262]::ty::ParamEnvAnd<rustc_middle[26d2dffd48681262]::mir::interpret::GlobalId>, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 24usize]>>>
  26:     0x7d69efae5431 - rustc_const_eval[7156c5b188f5b7df]::const_eval::valtrees::eval_to_valtree
  27:     0x7d69efae53c5 - <rustc_const_eval[7156c5b188f5b7df]::provide::{closure#0} as core[1cb6646e799f6e04]::ops::function::FnOnce<(rustc_middle[26d2dffd48681262]::ty::context::TyCtxt, rustc_middle[26d2dffd48681262]::ty::ParamEnvAnd<rustc_middle[26d2dffd48681262]::mir::interpret::GlobalId>)>>::call_once
  28:     0x7d69efae537c - rustc_query_impl[3d654a2da272ff0b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3d654a2da272ff0b]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 24usize]>>
  29:     0x7d69efae533d - <rustc_query_impl[3d654a2da272ff0b]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[1cb6646e799f6e04]::ops::function::FnOnce<(rustc_middle[26d2dffd48681262]::ty::context::TyCtxt, rustc_middle[26d2dffd48681262]::ty::ParamEnvAnd<rustc_middle[26d2dffd48681262]::mir::interpret::GlobalId>)>>::call_once
  30:     0x7d69ef4f5174 - rustc_query_system[a2213591f7f99b46]::query::plumbing::try_execute_query::<rustc_query_impl[3d654a2da272ff0b]::DynamicConfig<rustc_query_system[a2213591f7f99b46]::query::caches::DefaultCache<rustc_middle[26d2dffd48681262]::ty::ParamEnvAnd<rustc_middle[26d2dffd48681262]::mir::interpret::GlobalId>, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[3d654a2da272ff0b]::plumbing::QueryCtxt, false>
  31:     0x7d69ef4f6308 - rustc_query_impl[3d654a2da272ff0b]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  32:     0x7d69ef7e4531 - rustc_middle[26d2dffd48681262]::query::plumbing::query_get_at::<rustc_query_system[a2213591f7f99b46]::query::caches::DefaultCache<rustc_middle[26d2dffd48681262]::ty::ParamEnvAnd<rustc_middle[26d2dffd48681262]::mir::interpret::GlobalId>, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 24usize]>>>
  33:     0x7d69ef7a7333 - <rustc_middle[26d2dffd48681262]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  34:     0x7d69ef7a7897 - <rustc_middle[26d2dffd48681262]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  35:     0x7d69ede58bca - <rustc_infer[71a4b88f525f1d35]::infer::InferCtxt>::const_eval_resolve
  36:     0x7d69f059da07 - rustc_trait_selection[1289d1a30be2657f]::traits::const_evaluatable::is_const_evaluatable.cold
  37:     0x7d69ebad9518 - <rustc_trait_selection[1289d1a30be2657f]::traits::fulfill::FulfillProcessor as rustc_data_structures[a6033457ab63a4e5]::obligation_forest::ObligationProcessor>::process_obligation
  38:     0x7d69eee104e3 - <rustc_data_structures[a6033457ab63a4e5]::obligation_forest::ObligationForest<rustc_trait_selection[1289d1a30be2657f]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[1289d1a30be2657f]::traits::fulfill::FulfillProcessor>
  39:     0x7d69ef49b38c - <core[1cb6646e799f6e04]::iter::adapters::filter::Filter<core[1cb6646e799f6e04]::iter::adapters::map::Map<core[1cb6646e799f6e04]::slice::iter::Iter<rustc_hir_typeck[352626e963bc0738]::method::probe::Candidate>, <rustc_hir_typeck[352626e963bc0738]::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck[352626e963bc0738]::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core[1cb6646e799f6e04]::iter::traits::iterator::Iterator>::next
  40:     0x7d69ef496e60 - <rustc_hir_typeck[352626e963bc0738]::method::probe::ProbeContext>::pick_all_method
  41:     0x7d69edd39300 - <rustc_hir_typeck[352626e963bc0738]::method::probe::ProbeContext>::pick_core
  42:     0x7d69edce2715 - <core[1cb6646e799f6e04]::iter::adapters::filter_map::FilterMap<core[1cb6646e799f6e04]::slice::iter::Iter<rustc_span[8c88142470715f14]::symbol::Ident>, <rustc_hir_typeck[352626e963bc0738]::method::probe::ProbeContext>::probe_for_similar_candidate::{closure#0}::{closure#1}> as core[1cb6646e799f6e04]::iter::traits::iterator::Iterator>::next
  43:     0x7d69edd3ac9a - <rustc_hir_typeck[352626e963bc0738]::method::probe::ProbeContext>::probe_for_similar_candidate
  44:     0x7d69ef904029 - <rustc_hir_typeck[352626e963bc0738]::fn_ctxt::FnCtxt>::probe_for_name
  45:     0x7d69ef90cf3f - <rustc_hir_typeck[352626e963bc0738]::fn_ctxt::FnCtxt>::check_expr_path
  46:     0x7d69ef804c51 - <rustc_hir_typeck[352626e963bc0738]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  47:     0x7d69ef805aa0 - <rustc_hir_typeck[352626e963bc0738]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  48:     0x7d69ef80163d - <rustc_hir_typeck[352626e963bc0738]::fn_ctxt::FnCtxt>::check_block_with_expected
  49:     0x7d69ef8067d2 - <rustc_hir_typeck[352626e963bc0738]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  50:     0x7d69eeeca8b8 - rustc_hir_typeck[352626e963bc0738]::check::check_fn
  51:     0x7d69eeec0d64 - rustc_hir_typeck[352626e963bc0738]::typeck
  52:     0x7d69eeec07d1 - rustc_query_impl[3d654a2da272ff0b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3d654a2da272ff0b]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 8usize]>>
  53:     0x7d69ef1996ae - rustc_query_system[a2213591f7f99b46]::query::plumbing::try_execute_query::<rustc_query_impl[3d654a2da272ff0b]::DynamicConfig<rustc_query_system[a2213591f7f99b46]::query::caches::VecCache<rustc_span[8c88142470715f14]::def_id::LocalDefId, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[3d654a2da272ff0b]::plumbing::QueryCtxt, false>
  54:     0x7d69ef1983d5 - rustc_query_impl[3d654a2da272ff0b]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  55:     0x7d69ef19800b - <rustc_middle[26d2dffd48681262]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[cb47f6320a8de07e]::check_crate::{closure#4}>::{closure#0}
  56:     0x7d69ef196abc - rustc_hir_analysis[cb47f6320a8de07e]::check_crate
  57:     0x7d69ef176c7e - rustc_interface[9ff7c37c0a2ad37a]::passes::analysis
  58:     0x7d69ef1767d5 - rustc_query_impl[3d654a2da272ff0b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3d654a2da272ff0b]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 1usize]>>
  59:     0x7d69efb30425 - rustc_query_system[a2213591f7f99b46]::query::plumbing::try_execute_query::<rustc_query_impl[3d654a2da272ff0b]::DynamicConfig<rustc_query_system[a2213591f7f99b46]::query::caches::SingleCache<rustc_middle[26d2dffd48681262]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[3d654a2da272ff0b]::plumbing::QueryCtxt, false>
  60:     0x7d69efb3018f - rustc_query_impl[3d654a2da272ff0b]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  61:     0x7d69ef9cefce - rustc_interface[9ff7c37c0a2ad37a]::interface::run_compiler::<core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>, rustc_driver_impl[112c1aa6bb2c54d8]::run_compiler::{closure#0}>::{closure#1}
  62:     0x7d69ef9bab67 - std[4333a286c4712977]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[9ff7c37c0a2ad37a]::util::run_in_thread_with_globals<rustc_interface[9ff7c37c0a2ad37a]::util::run_in_thread_pool_with_globals<rustc_interface[9ff7c37c0a2ad37a]::interface::run_compiler<core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>, rustc_driver_impl[112c1aa6bb2c54d8]::run_compiler::{closure#0}>::{closure#1}, core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>>::{closure#0}, core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>>
  63:     0x7d69ef9ba92a - <<std[4333a286c4712977]::thread::Builder>::spawn_unchecked_<rustc_interface[9ff7c37c0a2ad37a]::util::run_in_thread_with_globals<rustc_interface[9ff7c37c0a2ad37a]::util::run_in_thread_pool_with_globals<rustc_interface[9ff7c37c0a2ad37a]::interface::run_compiler<core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>, rustc_driver_impl[112c1aa6bb2c54d8]::run_compiler::{closure#0}>::{closure#1}, core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>>::{closure#0}, core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1cb6646e799f6e04]::result::Result<(), rustc_span[8c88142470715f14]::ErrorGuaranteed>>::{closure#2} as core[1cb6646e799f6e04]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  64:     0x7d69f104d72b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4e53d953a4689d25
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/alloc/src/boxed.rs:2063:9
  65:     0x7d69f104d72b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb1f69d21a251f1d9
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/alloc/src/boxed.rs:2063:9
  66:     0x7d69f104d72b - std::sys::pal::unix::thread::Thread::new::thread_start::h03f22bbd669825b9
                               at /rustc/9e297bf54d31eb3b30067208ff9af4416945a2ed/library/std/src/sys/pal/unix/thread.rs:108:17
  67:     0x7d69ea8aa1cf - <unknown>
  68:     0x7d69ea92b6ec - <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 (9e297bf54 2024-05-24) 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.OVAak3vWStoD/rustc_testrunner_tmpdir_reporting.qW0WdZgTfrRb/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`.

@rustbot label +F-generic_const_exprs

Activity

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

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]`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