Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE caused by using feature(generic_const_exprs) #114463

Closed
iamanonymouscs opened this issue Aug 4, 2023 · 1 comment · Fixed by #124240
Closed

ICE caused by using feature(generic_const_exprs) #114463

iamanonymouscs opened this issue Aug 4, 2023 · 1 comment · Fixed by #124240
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@iamanonymouscs
Copy link

Code

The code runs as expected until we introduce the generic_const_exprs attribute and the compiler encounters an ICE error.

#![feature(generic_const_exprs)]
fn bug<'a>() {
    [(); (|_: &'a u8| (), 0).1];
}

Meta

rustc --version --verbose:

$ rustc --version --verbose
rustc 1.73.0-nightly (474709a9a 2023-08-03)
binary: rustc
commit-hash: 474709a9a2a74a8bcf0055fadb335d0ca0d2d939
commit-date: 2023-08-03
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5

Error output

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> file1.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[E0601]: `main` function not found in crate `file1`
 --> file1.rs:4:2
  |
4 | }
  |  ^ consider adding a `main` function to `file1.rs`

error: internal compiler error: compiler/rustc_borrowck/src/universal_regions.rs:880:36: cannot convert `ReFree(DefId(0:3 ~ file1[e613]::bug), BrNamed(DefId(0:4 ~ file1[e613]::bug::'a), 'a))` to a region vid

thread 'rustc' panicked at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/compiler/rustc_errors/src/lib.rs:1645:9:
Box<dyn Any>
stack backtrace:
   0:     0x7f7803f3c19c - std::backtrace_rs::backtrace::libunwind::trace::haf256adafafbe58d
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f7803f3c19c - std::backtrace_rs::backtrace::trace_unsynchronized::hfe1951132ff691c0
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7803f3c19c - std::sys_common::backtrace::_print_fmt::h9a0fe52434930c36
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f7803f3c19c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h24adccbf3e1ada83
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f7803fa289c - core::fmt::rt::Argument::fmt::h18ba555e398addfe
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/core/src/fmt/rt.rs:138:9
   5:     0x7f7803fa289c - core::fmt::write::hbf3ee2d80be74759
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f7803f2e90e - std::io::Write::write_fmt::hfc2b3251522ff943
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/io/mod.rs:1714:15
   7:     0x7f7803f3bf85 - std::sys_common::backtrace::_print::hfdc8ddb5f3ddee36
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f7803f3bf85 - std::sys_common::backtrace::print::h316f264b298c7a30
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f7803f3f0da - std::panicking::panic_hook_with_disk_dump::{{closure}}::h136bbb963feeea4a
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/panicking.rs:278:22
  10:     0x7f7803f3ed73 - std::panicking::panic_hook_with_disk_dump::hd91a018a982a84f7
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/panicking.rs:312:9
  11:     0x7f7802d0d799 - rustc_driver_impl[2c2bb0da6cfb3826]::install_ice_hook::{closure#0}
  12:     0x7f7803f3f980 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hd99b1fe24ccd07b5
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/alloc/src/boxed.rs:2021:9
  13:     0x7f7803f3f980 - std::panicking::rust_panic_with_hook::h1593161995c9c003
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/panicking.rs:733:13
  14:     0x7f78032971f1 - std[b7e5a9c79ea9fbed]::panicking::begin_panic::<rustc_errors[4345527545ed2164]::ExplicitBug>::{closure#0}
  15:     0x7f7803296096 - std[b7e5a9c79ea9fbed]::sys_common::backtrace::__rust_end_short_backtrace::<std[b7e5a9c79ea9fbed]::panicking::begin_panic<rustc_errors[4345527545ed2164]::ExplicitBug>::{closure#0}, !>
  16:     0x7f780322afc6 - std[b7e5a9c79ea9fbed]::panicking::begin_panic::<rustc_errors[4345527545ed2164]::ExplicitBug>
  17:     0x7f780320b344 - <rustc_errors[4345527545ed2164]::HandlerInner>::bug::<alloc[b2a4fa84f81d55c8]::string::String>
  18:     0x7f780320b1d6 - <rustc_errors[4345527545ed2164]::Handler>::bug::<alloc[b2a4fa84f81d55c8]::string::String>
  19:     0x7f780328b20c - rustc_middle[32728bc096d751c7]::util::bug::opt_span_bug_fmt::<rustc_span[9abd768efbccd329]::span_encoding::Span>::{closure#0}
  20:     0x7f780328a00a - rustc_middle[32728bc096d751c7]::ty::context::tls::with_opt::<rustc_middle[32728bc096d751c7]::util::bug::opt_span_bug_fmt<rustc_span[9abd768efbccd329]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f7803289fd8 - rustc_middle[32728bc096d751c7]::ty::context::tls::with_context_opt::<rustc_middle[32728bc096d751c7]::ty::context::tls::with_opt<rustc_middle[32728bc096d751c7]::util::bug::opt_span_bug_fmt<rustc_span[9abd768efbccd329]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f780165a400 - rustc_middle[32728bc096d751c7]::util::bug::bug_fmt
  23:     0x7f7801e8d860 - <rustc_borrowck[36619a147d0794a8]::type_check::constraint_conversion::ConstraintConversion>::convert_all
  24:     0x7f7801e8e1c6 - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::push_region_constraints
  25:     0x7f7801a5ab80 - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::ascribe_user_type_skip_wf
  26:     0x7f7801a53c90 - rustc_borrowck[36619a147d0794a8]::type_check::type_check
  27:     0x7f7801a4a34f - rustc_borrowck[36619a147d0794a8]::nll::compute_regions
  28:     0x7f7801a24ed5 - rustc_borrowck[36619a147d0794a8]::do_mir_borrowck
  29:     0x7f7801a231e5 - rustc_borrowck[36619a147d0794a8]::mir_borrowck
  30:     0x7f7800d3976e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  31:     0x7f7800d3973e - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  32:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  33:     0x7f780269094f - rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7f7801e9cb9f - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::prove_closure_bounds
  35:     0x7f7801e6b39d - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::typeck_mir
  36:     0x7f7801a52a01 - rustc_borrowck[36619a147d0794a8]::type_check::type_check
  37:     0x7f7801a4a34f - rustc_borrowck[36619a147d0794a8]::nll::compute_regions
  38:     0x7f7801a24ed5 - rustc_borrowck[36619a147d0794a8]::do_mir_borrowck
  39:     0x7f7801a231e5 - rustc_borrowck[36619a147d0794a8]::mir_borrowck
  40:     0x7f7800d3976e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  41:     0x7f7800d3973e - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  42:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  43:     0x7f780269094f - rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  44:     0x7f780137344e - rustc_mir_transform[2797bcf166cffb39]::mir_drops_elaborated_and_const_checked
  45:     0x7f7800d42a3e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  46:     0x7f7800d42a0e - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  47:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  48:     0x7f780268752f - rustc_query_impl[c311561e1f786c65]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  49:     0x7f7801bf4b63 - rustc_mir_transform[2797bcf166cffb39]::mir_for_ctfe
  50:     0x7f7800dabe4e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_for_ctfe::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  51:     0x7f7800dabe21 - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_for_ctfe::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::DefId)>>::call_once
  52:     0x7f7800d38145 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_span[9abd768efbccd329]::def_id::DefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  53:     0x7f7802687680 - rustc_query_impl[c311561e1f786c65]::query_impl::mir_for_ctfe::get_query_non_incr::__rust_end_short_backtrace
  54:     0x7f7801279c60 - <rustc_const_eval[9e95d3ca9e32f8a5]::interpret::eval_context::InterpCx<rustc_const_eval[9e95d3ca9e32f8a5]::const_eval::machine::CompileTimeInterpreter>>::load_mir
  55:     0x7f780117f901 - rustc_const_eval[9e95d3ca9e32f8a5]::const_eval::eval_queries::eval_to_allocation_raw_provider
  56:     0x7f7800d8a427 - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>
  57:     0x7f7801c219f7 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  58:     0x7f7801c21679 - rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  59:     0x7f780117fe67 - rustc_const_eval[9e95d3ca9e32f8a5]::const_eval::eval_queries::eval_to_allocation_raw_provider
  60:     0x7f7800d8a427 - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>
  61:     0x7f7801c219f7 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  62:     0x7f7801c21679 - rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  63:     0x7f780246503a - <rustc_const_eval[9e95d3ca9e32f8a5]::provide::{closure#0} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>)>>::call_once
  64:     0x7f780217a459 - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 24usize]>>
  65:     0x7f780217a408 - <rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>)>>::call_once
  66:     0x7f78022fa0c8 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  67:     0x7f78022f9d5e - rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  68:     0x7f78012eab4c - rustc_middle[32728bc096d751c7]::query::plumbing::query_get_at::<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 24usize]>>>
  69:     0x7f78012ea8eb - <rustc_middle[32728bc096d751c7]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  70:     0x7f78012ea3c4 - <rustc_middle[32728bc096d751c7]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  71:     0x7f780145ca87 - <rustc_middle[32728bc096d751c7]::ty::consts::Const>::eval
  72:     0x7f78013e71ff - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  73:     0x7f7801425d54 - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_block_with_expected
  74:     0x7f78013e3433 - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  75:     0x7f780156899b - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_return_expr
  76:     0x7f780156704c - rustc_hir_typeck[a1aa762a977bcd63]::check::check_fn
  77:     0x7f7801555b55 - rustc_hir_typeck[a1aa762a977bcd63]::typeck
  78:     0x7f7800d0b08c - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  79:     0x7f7800d0b06e - <rustc_query_impl[c311561e1f786c65]::query_impl::typeck::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  80:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  81:     0x7f78026906cf - rustc_query_impl[c311561e1f786c65]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  82:     0x7f780219be22 - rustc_data_structures[e5ddef51fa833839]::sync::par_for_each_in::<&[rustc_span[9abd768efbccd329]::def_id::LocalDefId], <rustc_middle[32728bc096d751c7]::hir::map::Map>::par_body_owners<rustc_hir_analysis[505bd014cb0020b8]::check_crate::{closure#7}>::{closure#0}>
  83:     0x7f780219ae2a - rustc_hir_analysis[505bd014cb0020b8]::check_crate
  84:     0x7f78021955ca - rustc_interface[b10bd5cb1b971de9]::passes::analysis
  85:     0x7f78021ffd8a - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 1usize]>>
  86:     0x7f78021ffd79 - <rustc_query_impl[c311561e1f786c65]::query_impl::analysis::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, ())>>::call_once
  87:     0x7f780239b368 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::SingleCache<rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  88:     0x7f780239b0f7 - rustc_query_impl[c311561e1f786c65]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  89:     0x7f7801f798c5 - <rustc_middle[32728bc096d751c7]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>
  90:     0x7f7801f78ef2 - <rustc_interface[b10bd5cb1b971de9]::interface::Compiler>::enter::<rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}::{closure#2}, core[8e2a8f22f3da315]::result::Result<core[8e2a8f22f3da315]::option::Option<rustc_interface[b10bd5cb1b971de9]::queries::Linker>, rustc_span[9abd768efbccd329]::ErrorGuaranteed>>
  91:     0x7f7801f71fc8 - std[b7e5a9c79ea9fbed]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b10bd5cb1b971de9]::util::run_in_thread_pool_with_globals<rustc_interface[b10bd5cb1b971de9]::interface::run_compiler<core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>, rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}>::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>
  92:     0x7f7801f7174e - <<std[b7e5a9c79ea9fbed]::thread::Builder>::spawn_unchecked_<rustc_interface[b10bd5cb1b971de9]::util::run_in_thread_pool_with_globals<rustc_interface[b10bd5cb1b971de9]::interface::run_compiler<core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>, rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}>::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>::{closure#1} as core[8e2a8f22f3da315]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  93:     0x7f7803f4a125 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb18992c0c074fb04
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/alloc/src/boxed.rs:2007:9
  94:     0x7f7803f4a125 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha4998f5f9033c44e
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/alloc/src/boxed.rs:2007:9
  95:     0x7f7803f4a125 - std::sys::unix::thread::Thread::new::thread_start::h3370231efa79af31
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys/unix/thread.rs:108:17
  96:     0x7f77ff4c76db - start_thread
  97:     0x7f77ff1f061f - clone
  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 attach the file at `/home/coding/rustc-ice-2023-08-04T08:42:06.45358537Z-23008.txt` to your bug report

query stack during panic:
#0 [mir_borrowck] borrow-checking `bug::{constant#0}::{closure#0}`
#1 [mir_borrowck] borrow-checking `bug::{constant#0}`
#2 [mir_drops_elaborated_and_const_checked] elaborating drops for `bug::{constant#0}`
#3 [mir_for_ctfe] caching mir of `bug::{constant#0}` for CTFE
#4 [eval_to_allocation_raw] const-evaluating + checking `bug::{constant#0}`
#5 [eval_to_allocation_raw] const-evaluating + checking `bug::{constant#0}`
#6 [eval_to_valtree] evaluating type-level constant
#7 [typeck] type-checking `bug`
#8 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0601`.


Backtrace

thread 'rustc' panicked at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/compiler/rustc_errors/src/lib.rs:1645:9:
Box<dyn Any>
stack backtrace:
   0:     0x7f7803f3c19c - std::backtrace_rs::backtrace::libunwind::trace::haf256adafafbe58d
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f7803f3c19c - std::backtrace_rs::backtrace::trace_unsynchronized::hfe1951132ff691c0
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7803f3c19c - std::sys_common::backtrace::_print_fmt::h9a0fe52434930c36
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f7803f3c19c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h24adccbf3e1ada83
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f7803fa289c - core::fmt::rt::Argument::fmt::h18ba555e398addfe
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/core/src/fmt/rt.rs:138:9
   5:     0x7f7803fa289c - core::fmt::write::hbf3ee2d80be74759
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f7803f2e72e - std::io::Write::write_fmt::h095206be3c257ac2
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/io/mod.rs:1714:15
   7:     0x7f7803f3bf85 - std::sys_common::backtrace::_print::hfdc8ddb5f3ddee36
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f7803f3bf85 - std::sys_common::backtrace::print::h316f264b298c7a30
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f7803f3f0da - std::panicking::panic_hook_with_disk_dump::{{closure}}::h136bbb963feeea4a
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/panicking.rs:278:22
  10:     0x7f7803f3ec46 - std::panicking::panic_hook_with_disk_dump::hd91a018a982a84f7
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/panicking.rs:305:9
  11:     0x7f7802d0d799 - rustc_driver_impl[2c2bb0da6cfb3826]::install_ice_hook::{closure#0}
  12:     0x7f7803f3f980 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hd99b1fe24ccd07b5
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/alloc/src/boxed.rs:2021:9
  13:     0x7f7803f3f980 - std::panicking::rust_panic_with_hook::h1593161995c9c003
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/panicking.rs:733:13
  14:     0x7f78032971f1 - std[b7e5a9c79ea9fbed]::panicking::begin_panic::<rustc_errors[4345527545ed2164]::ExplicitBug>::{closure#0}
  15:     0x7f7803296096 - std[b7e5a9c79ea9fbed]::sys_common::backtrace::__rust_end_short_backtrace::<std[b7e5a9c79ea9fbed]::panicking::begin_panic<rustc_errors[4345527545ed2164]::ExplicitBug>::{closure#0}, !>
  16:     0x7f780322afc6 - std[b7e5a9c79ea9fbed]::panicking::begin_panic::<rustc_errors[4345527545ed2164]::ExplicitBug>
  17:     0x7f780320b344 - <rustc_errors[4345527545ed2164]::HandlerInner>::bug::<alloc[b2a4fa84f81d55c8]::string::String>
  18:     0x7f780320b1d6 - <rustc_errors[4345527545ed2164]::Handler>::bug::<alloc[b2a4fa84f81d55c8]::string::String>
  19:     0x7f780328b20c - rustc_middle[32728bc096d751c7]::util::bug::opt_span_bug_fmt::<rustc_span[9abd768efbccd329]::span_encoding::Span>::{closure#0}
  20:     0x7f780328a00a - rustc_middle[32728bc096d751c7]::ty::context::tls::with_opt::<rustc_middle[32728bc096d751c7]::util::bug::opt_span_bug_fmt<rustc_span[9abd768efbccd329]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f7803289fd8 - rustc_middle[32728bc096d751c7]::ty::context::tls::with_context_opt::<rustc_middle[32728bc096d751c7]::ty::context::tls::with_opt<rustc_middle[32728bc096d751c7]::util::bug::opt_span_bug_fmt<rustc_span[9abd768efbccd329]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f780165a400 - rustc_middle[32728bc096d751c7]::util::bug::bug_fmt
  23:     0x7f7801e8d860 - <rustc_borrowck[36619a147d0794a8]::type_check::constraint_conversion::ConstraintConversion>::convert_all
  24:     0x7f7801e8e1c6 - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::push_region_constraints
  25:     0x7f7801a5ab80 - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::ascribe_user_type_skip_wf
  26:     0x7f7801a53c90 - rustc_borrowck[36619a147d0794a8]::type_check::type_check
  27:     0x7f7801a4a34f - rustc_borrowck[36619a147d0794a8]::nll::compute_regions
  28:     0x7f7801a24ed5 - rustc_borrowck[36619a147d0794a8]::do_mir_borrowck
  29:     0x7f7801a231e5 - rustc_borrowck[36619a147d0794a8]::mir_borrowck
  30:     0x7f7800d3976e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  31:     0x7f7800d3973e - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  32:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  33:     0x7f780269094f - rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7f7801e9cb9f - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::prove_closure_bounds
  35:     0x7f7801e6b39d - <rustc_borrowck[36619a147d0794a8]::type_check::TypeChecker>::typeck_mir
  36:     0x7f7801a52a01 - rustc_borrowck[36619a147d0794a8]::type_check::type_check
  37:     0x7f7801a4a34f - rustc_borrowck[36619a147d0794a8]::nll::compute_regions
  38:     0x7f7801a24ed5 - rustc_borrowck[36619a147d0794a8]::do_mir_borrowck
  39:     0x7f7801a231e5 - rustc_borrowck[36619a147d0794a8]::mir_borrowck
  40:     0x7f7800d3976e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  41:     0x7f7800d3973e - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  42:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  43:     0x7f780269094f - rustc_query_impl[c311561e1f786c65]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  44:     0x7f780137344e - rustc_mir_transform[2797bcf166cffb39]::mir_drops_elaborated_and_const_checked
  45:     0x7f7800d42a3e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  46:     0x7f7800d42a0e - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  47:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  48:     0x7f780268752f - rustc_query_impl[c311561e1f786c65]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  49:     0x7f7801bf4b63 - rustc_mir_transform[2797bcf166cffb39]::mir_for_ctfe
  50:     0x7f7800dabe4e - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::mir_for_ctfe::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  51:     0x7f7800dabe21 - <rustc_query_impl[c311561e1f786c65]::query_impl::mir_for_ctfe::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::DefId)>>::call_once
  52:     0x7f7800d38145 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_span[9abd768efbccd329]::def_id::DefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  53:     0x7f7802687680 - rustc_query_impl[c311561e1f786c65]::query_impl::mir_for_ctfe::get_query_non_incr::__rust_end_short_backtrace
  54:     0x7f7801279c60 - <rustc_const_eval[9e95d3ca9e32f8a5]::interpret::eval_context::InterpCx<rustc_const_eval[9e95d3ca9e32f8a5]::const_eval::machine::CompileTimeInterpreter>>::load_mir
  55:     0x7f780117f901 - rustc_const_eval[9e95d3ca9e32f8a5]::const_eval::eval_queries::eval_to_allocation_raw_provider
  56:     0x7f7800d8a427 - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>
  57:     0x7f7801c219f7 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  58:     0x7f7801c21679 - rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  59:     0x7f780117fe67 - rustc_const_eval[9e95d3ca9e32f8a5]::const_eval::eval_queries::eval_to_allocation_raw_provider
  60:     0x7f7800d8a427 - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>
  61:     0x7f7801c219f7 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  62:     0x7f7801c21679 - rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  63:     0x7f780246503a - <rustc_const_eval[9e95d3ca9e32f8a5]::provide::{closure#0} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>)>>::call_once
  64:     0x7f780217a459 - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 24usize]>>
  65:     0x7f780217a408 - <rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>)>>::call_once
  66:     0x7f78022fa0c8 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  67:     0x7f78022f9d5e - rustc_query_impl[c311561e1f786c65]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  68:     0x7f78012eab4c - rustc_middle[32728bc096d751c7]::query::plumbing::query_get_at::<rustc_query_system[1215f1fc07ea991a]::query::caches::DefaultCache<rustc_middle[32728bc096d751c7]::ty::ParamEnvAnd<rustc_middle[32728bc096d751c7]::mir::interpret::GlobalId>, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 24usize]>>>
  69:     0x7f78012ea8eb - <rustc_middle[32728bc096d751c7]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  70:     0x7f78012ea3c4 - <rustc_middle[32728bc096d751c7]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  71:     0x7f780145ca87 - <rustc_middle[32728bc096d751c7]::ty::consts::Const>::eval
  72:     0x7f78013e71ff - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  73:     0x7f7801425d54 - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_block_with_expected
  74:     0x7f78013e3433 - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  75:     0x7f780156899b - <rustc_hir_typeck[a1aa762a977bcd63]::fn_ctxt::FnCtxt>::check_return_expr
  76:     0x7f780156704c - rustc_hir_typeck[a1aa762a977bcd63]::check::check_fn
  77:     0x7f7801555b55 - rustc_hir_typeck[a1aa762a977bcd63]::typeck
  78:     0x7f7800d0b08c - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>
  79:     0x7f7800d0b06e - <rustc_query_impl[c311561e1f786c65]::query_impl::typeck::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, rustc_span[9abd768efbccd329]::def_id::LocalDefId)>>::call_once
  80:     0x7f7800e80c3d - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::VecCache<rustc_span[9abd768efbccd329]::def_id::LocalDefId, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  81:     0x7f78026906cf - rustc_query_impl[c311561e1f786c65]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  82:     0x7f780219be22 - rustc_data_structures[e5ddef51fa833839]::sync::par_for_each_in::<&[rustc_span[9abd768efbccd329]::def_id::LocalDefId], <rustc_middle[32728bc096d751c7]::hir::map::Map>::par_body_owners<rustc_hir_analysis[505bd014cb0020b8]::check_crate::{closure#7}>::{closure#0}>
  83:     0x7f780219ae2a - rustc_hir_analysis[505bd014cb0020b8]::check_crate
  84:     0x7f78021955ca - rustc_interface[b10bd5cb1b971de9]::passes::analysis
  85:     0x7f78021ffd8a - rustc_query_impl[c311561e1f786c65]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c311561e1f786c65]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 1usize]>>
  86:     0x7f78021ffd79 - <rustc_query_impl[c311561e1f786c65]::query_impl::analysis::dynamic_query::{closure#2} as core[8e2a8f22f3da315]::ops::function::FnOnce<(rustc_middle[32728bc096d751c7]::ty::context::TyCtxt, ())>>::call_once
  87:     0x7f780239b368 - rustc_query_system[1215f1fc07ea991a]::query::plumbing::try_execute_query::<rustc_query_impl[c311561e1f786c65]::DynamicConfig<rustc_query_system[1215f1fc07ea991a]::query::caches::SingleCache<rustc_middle[32728bc096d751c7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[c311561e1f786c65]::plumbing::QueryCtxt, false>
  88:     0x7f780239b0f7 - rustc_query_impl[c311561e1f786c65]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  89:     0x7f7801f798c5 - <rustc_middle[32728bc096d751c7]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>
  90:     0x7f7801f78ef2 - <rustc_interface[b10bd5cb1b971de9]::interface::Compiler>::enter::<rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}::{closure#2}, core[8e2a8f22f3da315]::result::Result<core[8e2a8f22f3da315]::option::Option<rustc_interface[b10bd5cb1b971de9]::queries::Linker>, rustc_span[9abd768efbccd329]::ErrorGuaranteed>>
  91:     0x7f7801f71fc8 - std[b7e5a9c79ea9fbed]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b10bd5cb1b971de9]::util::run_in_thread_pool_with_globals<rustc_interface[b10bd5cb1b971de9]::interface::run_compiler<core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>, rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}>::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>
  92:     0x7f7801f7174e - <<std[b7e5a9c79ea9fbed]::thread::Builder>::spawn_unchecked_<rustc_interface[b10bd5cb1b971de9]::util::run_in_thread_pool_with_globals<rustc_interface[b10bd5cb1b971de9]::interface::run_compiler<core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>, rustc_driver_impl[2c2bb0da6cfb3826]::run_compiler::{closure#1}>::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8e2a8f22f3da315]::result::Result<(), rustc_span[9abd768efbccd329]::ErrorGuaranteed>>::{closure#1} as core[8e2a8f22f3da315]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  93:     0x7f7803f4a125 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb18992c0c074fb04
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/alloc/src/boxed.rs:2007:9
  94:     0x7f7803f4a125 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha4998f5f9033c44e
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/alloc/src/boxed.rs:2007:9
  95:     0x7f7803f4a125 - std::sys::unix::thread::Thread::new::thread_start::h3370231efa79af31
                               at /rustc/474709a9a2a74a8bcf0055fadb335d0ca0d2d939/library/std/src/sys/unix/thread.rs:108:17
  96:     0x7f77ff4c76db - start_thread
  97:     0x7f77ff1f061f - clone
  98:                0x0 - <unknown>


rustc version: 1.73.0-nightly (474709a9a 2023-08-03)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_borrowck] borrow-checking `bug::{constant#0}::{closure#0}`
#1 [mir_borrowck] borrow-checking `bug::{constant#0}`
#2 [mir_drops_elaborated_and_const_checked] elaborating drops for `bug::{constant#0}`
#3 [mir_for_ctfe] caching mir of `bug::{constant#0}` for CTFE
#4 [eval_to_allocation_raw] const-evaluating + checking `bug::{constant#0}`
#5 [eval_to_allocation_raw] const-evaluating + checking `bug::{constant#0}`
#6 [eval_to_valtree] evaluating type-level constant
#7 [typeck] type-checking `bug`
#8 [analysis] running analysis passes on this crate
end of query stack

@iamanonymouscs iamanonymouscs added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 4, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 4, 2023
@iamanonymouscs
Copy link
Author

Based on the description provided in the document, if two Internal Compiler Errors (ICEs) have different query stacks, they are considered as separate bugs. Therefore, it is believed that ICE #114463 is distinct from ICE #114212.

@saethlin saethlin added requires-nightly This issue requires a nightly compiler in some way. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 12, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 22, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 22, 2024
@bors bors closed this as completed in a42adf2 Apr 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 22, 2024
Rollup merge of rust-lang#124240 - matthiaskrgr:tests_sunday, r=compiler-errors

add a couple tests for fixed ICEs.

Fixes rust-lang#121413
Fixes rust-lang#121463
Fixes rust-lang#114463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants