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: generic_const_exprs: ConstEvaluatable has escaping bound vars, so it cannot be wrapped in a dummy binder. #105689

Closed
matthiaskrgr opened this issue Dec 14, 2022 · 2 comments · Fixed by #105694
Assignees
Labels
C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` 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

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Dec 14, 2022

Code

// check-pass
// edition:2018

#[allow(unused)]
async fn foo<'a>() {
    let _data = &mut [0u8; { 1 + 4 }];
    bar().await
}

async fn bar() {}

fn main() {}

Meta

rustc --version --verbose:

rustc 1.68.0-nightly (0f529f0f4 2022-12-13)
binary: rustc
commit-hash: 0f529f0f49f4dd404b78e605398531c96f220fc5
commit-date: 2022-12-13
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Error output

rustc 79/79f1a47c3c1ced9796131aa4eb9461c27474f30c.rs "-Zcrate-attr=feature(generic_const_exprs)" --edition=2021

<output>
Backtrace

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> <crate attribute>:1:9
  |
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

thread '<unnamed>' panicked at '`ConstEvaluatable(Const { ty: usize, kind: Unevaluated(UnevaluatedConst { def: WithOptConstParam { did: DefId(0:6 ~ 79f1a47c3c1ced9796131aa4eb9461c27474f30c[40fc]::foo::{closure#0}::{constant#0}), const_param_did: None }, substs: [ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon(2, Some(79/79f1a47c3c1ced9796131aa4eb9461c27474f30c.rs:5:14: 5:16 (#0))) })] }) })` has escaping bound vars, so it cannot be wrapped in a dummy binder.', compiler/rustc_trait_selection/src/traits/wf.rs:458:33
stack backtrace:
   0:     0x7f742e9667da - std::backtrace_rs::backtrace::libunwind::trace::h7785c191eb7ee216
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f742e9667da - std::backtrace_rs::backtrace::trace_unsynchronized::hf351b38b6771dec4
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f742e9667da - std::sys_common::backtrace::_print_fmt::h713ede78758becef
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f742e9667da - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1878899793c73488
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f742e9c92ee - core::fmt::write::h13bbbc03afcba1c1
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f742e956c65 - std::io::Write::write_fmt::hfb2ca3e9f8803080
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/io/mod.rs:1682:15
   6:     0x7f742e9665a5 - std::sys_common::backtrace::_print::hd117bfadcc3f249e
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f742e9665a5 - std::sys_common::backtrace::print::h7e9c04ba80eb0074
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f742e9692ef - std::panicking::default_hook::{{closure}}::hb29d3d4cad77f77b
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:267:22
   9:     0x7f742e96902b - std::panicking::default_hook::hb9cd54f32e45cbdf
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:286:9
  10:     0x7f742e969b0c - std::panicking::rust_panic_with_hook::heec3062a77321665
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:688:13
  11:     0x7f742e9698a9 - std::panicking::begin_panic_handler::{{closure}}::hc198257d983dd2f7
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:579:13
  12:     0x7f742e966c8c - std::sys_common::backtrace::__rust_end_short_backtrace::he3b3e3efc14f5ea5
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:137:18
  13:     0x7f742e9695b2 - rust_begin_unwind
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:575:5
  14:     0x7f742e9c5cd3 - core::panicking::panic_fmt::h56031442da36123d
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/core/src/panicking.rs:64:14
  15:     0x7f742ffab729 - <rustc_middle[fb11b19bba64d848]::ty::sty::Binder<rustc_middle[fb11b19bba64d848]::ty::PredicateKind>>::dummy
  16:     0x7f7430230712 - <rustc_trait_selection[1e153bf3b090dfe7]::traits::wf::WfPredicates>::compute
  17:     0x7f742ff1502f - <rustc_trait_selection[1e153bf3b090dfe7]::traits::fulfill::FulfillProcessor as rustc_data_structures[27389a654890db55]::obligation_forest::ObligationProcessor>::process_obligation
  18:     0x7f742ff1242e - <rustc_data_structures[27389a654890db55]::obligation_forest::ObligationForest<rustc_trait_selection[1e153bf3b090dfe7]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[1e153bf3b090dfe7]::traits::fulfill::FulfillProcessor>
  19:     0x7f742fd06690 - <rustc_trait_selection[1e153bf3b090dfe7]::traits::fulfill::FulfillmentContext as rustc_infer[436d8bad8048b04b]::traits::engine::TraitEngine>::select_all_or_error
  20:     0x7f742ffd9377 - <rustc_hir_typeck[bcca6203b1ef6d01]::inherited::InheritedBuilder>::enter::<rustc_hir_typeck[bcca6203b1ef6d01]::typeck_with_fallback<rustc_hir_typeck[bcca6203b1ef6d01]::typeck::{closure#0}>::{closure#0}::{closure#1}, &rustc_middle[fb11b19bba64d848]::ty::context::TypeckResults>
  21:     0x7f742ffcc041 - rustc_hir_typeck[bcca6203b1ef6d01]::typeck
  22:     0x7f742ffca324 - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::VecCache<rustc_span[22b27358efe64712]::def_id::LocalDefId, &rustc_middle[fb11b19bba64d848]::ty::context::TypeckResults>>
  23:     0x7f74315ee9dc - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::typeck
  24:     0x7f74306c2629 - rustc_mir_build[465e1e7760d886e7]::thir::cx::thir_body
  25:     0x7f7430cd10ba - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::ty::WithOptConstParam<rustc_span[22b27358efe64712]::def_id::LocalDefId>, core[454b920cfc772497]::result::Result<(&rustc_data_structures[27389a654890db55]::steal::Steal<rustc_middle[fb11b19bba64d848]::thir::Thir>, rustc_middle[fb11b19bba64d848]::thir::ExprId), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>>
  26:     0x7f7430cc99de - rustc_mir_build[465e1e7760d886e7]::build::mir_built
  27:     0x7f743058d9ba - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::ty::WithOptConstParam<rustc_span[22b27358efe64712]::def_id::LocalDefId>, &rustc_data_structures[27389a654890db55]::steal::Steal<rustc_middle[fb11b19bba64d848]::mir::Body>>>
  28:     0x7f7430598684 - rustc_mir_transform[a30e9448cdbece04]::check_unsafety::unsafety_check_result
  29:     0x7f74305937fe - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::VecCache<rustc_span[22b27358efe64712]::def_id::LocalDefId, &rustc_middle[fb11b19bba64d848]::mir::query::UnsafetyCheckResult>>
  30:     0x7f7430590174 - rustc_mir_transform[a30e9448cdbece04]::mir_const
  31:     0x7f743058dcf0 - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::ty::WithOptConstParam<rustc_span[22b27358efe64712]::def_id::LocalDefId>, &rustc_data_structures[27389a654890db55]::steal::Steal<rustc_middle[fb11b19bba64d848]::mir::Body>>>
  32:     0x7f7430bad3de - rustc_mir_transform[a30e9448cdbece04]::mir_promoted
  33:     0x7f7430997c1e - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::ty::WithOptConstParam<rustc_span[22b27358efe64712]::def_id::LocalDefId>, (&rustc_data_structures[27389a654890db55]::steal::Steal<rustc_middle[fb11b19bba64d848]::mir::Body>, &rustc_data_structures[27389a654890db55]::steal::Steal<rustc_index[27d71b2669183e7d]::vec::IndexVec<rustc_middle[fb11b19bba64d848]::mir::Promoted, rustc_middle[fb11b19bba64d848]::mir::Body>>)>>
  34:     0x7f743099648f - rustc_borrowck[321066d147c467a7]::mir_borrowck
  35:     0x7f7430bdbb5e - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::VecCache<rustc_span[22b27358efe64712]::def_id::LocalDefId, &rustc_middle[fb11b19bba64d848]::mir::query::BorrowCheckResult>>
  36:     0x7f74315eedaa - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::mir_borrowck
  37:     0x7f7431447073 - rustc_hir_analysis[423524a2adbac610]::collect::type_of::type_of
  38:     0x7f74305467d7 - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::type_of, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  39:     0x7f7430da78bc - rustc_hir_analysis[423524a2adbac610]::check::check::check_mod_item_types
  40:     0x7f74307a7d1d - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::VecCache<rustc_span[22b27358efe64712]::def_id::LocalDefId, ()>>
  41:     0x7f743103b443 - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::check_mod_item_types, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  42:     0x7f74312e7d55 - <rustc_middle[fb11b19bba64d848]::hir::map::Map>::for_each_module::<rustc_hir_analysis[423524a2adbac610]::check_crate::{closure#6}::{closure#0}>
  43:     0x7f74301c8272 - rustc_hir_analysis[423524a2adbac610]::check_crate
  44:     0x7f74301c7ebb - rustc_interface[5feaddc0f04e2ee8]::passes::analysis
  45:     0x7f7431409727 - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<(), core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>>
  46:     0x7f7431409420 - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::analysis, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  47:     0x7f7430e231f3 - <rustc_interface[5feaddc0f04e2ee8]::passes::QueryContext>::enter::<rustc_driver[a18c018241618262]::run_compiler::{closure#1}::{closure#2}::{closure#2}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  48:     0x7f7430e1f5a3 - <rustc_interface[5feaddc0f04e2ee8]::interface::Compiler>::enter::<rustc_driver[a18c018241618262]::run_compiler::{closure#1}::{closure#2}, core[454b920cfc772497]::result::Result<core[454b920cfc772497]::option::Option<rustc_interface[5feaddc0f04e2ee8]::queries::Linker>, rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  49:     0x7f7430e1a608 - rustc_span[22b27358efe64712]::with_source_map::<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  50:     0x7f7430e1a0f5 - <scoped_tls[a9410c74fe979615]::ScopedKey<rustc_span[22b27358efe64712]::SessionGlobals>>::set::<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  51:     0x7f7430e196e2 - std[e2221f2923982408]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  52:     0x7f7431500e6e - <<std[e2221f2923982408]::thread::Builder>::spawn_unchecked_<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#1} as core[454b920cfc772497]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  53:     0x7f7432a10043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd5e0dcf36c8eb2ec
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  54:     0x7f7432a10043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5249b73c8953b95a
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  55:     0x7f7432a10043 - std::sys::unix::thread::Thread::new::thread_start::h680046a940e18e85
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys/unix/thread.rs:108:17
  56:     0x7f742e7068fd - <unknown>
  57:     0x7f742e788a60 - <unknown>
  58:                0x0 - <unknown>
warning: 1 warning emitted

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: VecMap([(OpaqueTypeKey { def_id: DefId(0:10 ~ 79f1a47c3c1ced9796131aa4eb9461c27474f30c[40fc]::foo::{opaque#0}), substs: [ReEarlyBound(0, 'a), ReEarlyBound(0, 'a)] }, OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: 79/79f1a47c3c1ced9796131aa4eb9461c27474f30c.rs:5:20: 5:20 (#9), ty: _ }, origin: AsyncFn(DefId(0:3 ~ 79f1a47c3c1ced9796131aa4eb9461c27474f30c[40fc]::foo)) })])
  |
  = note: delayed at compiler/rustc_infer/src/infer/opaque_types/table.rs:50:26

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1610:13
stack backtrace:
   0:     0x7f7432a0638a - std::backtrace_rs::backtrace::libunwind::trace::h7785c191eb7ee216
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f7432a0638a - std::backtrace_rs::backtrace::trace_unsynchronized::hf351b38b6771dec4
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7432a0638a - std::sys_common::backtrace::_print_fmt::h713ede78758becef
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f7432a0638a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1878899793c73488
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f742e9c92ee - core::fmt::write::h13bbbc03afcba1c1
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f74329fa555 - std::io::Write::write_fmt::hfb2ca3e9f8803080
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/io/mod.rs:1682:15
   6:     0x7f7432a06155 - std::sys_common::backtrace::_print::hd117bfadcc3f249e
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f7432a06155 - std::sys_common::backtrace::print::h7e9c04ba80eb0074
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f7432a084df - std::panicking::default_hook::{{closure}}::hb29d3d4cad77f77b
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:267:22
   9:     0x7f7432a0821b - std::panicking::default_hook::hb9cd54f32e45cbdf
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:286:9
  10:     0x7f7431c3c6f1 - rustc_driver[a18c018241618262]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f7432a08cdd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h7096ae9426bf0ef4
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2032:9
  12:     0x7f7432a08cdd - std::panicking::rust_panic_with_hook::heec3062a77321665
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:692:13
  13:     0x7f7431c754c1 - std[e2221f2923982408]::panicking::begin_panic::<rustc_errors[55c94f74a3e69376]::ExplicitBug>::{closure#0}
  14:     0x7f7431c73d76 - std[e2221f2923982408]::sys_common::backtrace::__rust_end_short_backtrace::<std[e2221f2923982408]::panicking::begin_panic<rustc_errors[55c94f74a3e69376]::ExplicitBug>::{closure#0}, !>
  15:     0x7f7431c52f26 - std[e2221f2923982408]::panicking::begin_panic::<rustc_errors[55c94f74a3e69376]::ExplicitBug>
  16:     0x7f7431c717d6 - std[e2221f2923982408]::panic::panic_any::<rustc_errors[55c94f74a3e69376]::ExplicitBug>
  17:     0x7f74311490a6 - <rustc_errors[55c94f74a3e69376]::HandlerInner>::flush_delayed::<alloc[89c3e70836bb9ff9]::vec::Vec<rustc_errors[55c94f74a3e69376]::diagnostic::Diagnostic>, &str>
  18:     0x7f74311483ab - <rustc_errors[55c94f74a3e69376]::HandlerInner as core[454b920cfc772497]::ops::drop::Drop>::drop
  19:     0x7f7430e2b50e - core[454b920cfc772497]::ptr::drop_in_place::<rustc_session[1886fb585cbb0752]::parse::ParseSess>
  20:     0x7f7430e1b9bf - core[454b920cfc772497]::ptr::drop_in_place::<rustc_session[1886fb585cbb0752]::session::Session>
  21:     0x7f7430e1b6f0 - core[454b920cfc772497]::ptr::drop_in_place::<rustc_interface[5feaddc0f04e2ee8]::interface::Compiler>
  22:     0x7f7430e1aac8 - rustc_span[22b27358efe64712]::with_source_map::<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  23:     0x7f7430e1a0f5 - <scoped_tls[a9410c74fe979615]::ScopedKey<rustc_span[22b27358efe64712]::SessionGlobals>>::set::<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  24:     0x7f7430e196e2 - std[e2221f2923982408]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  25:     0x7f7431500e6e - <<std[e2221f2923982408]::thread::Builder>::spawn_unchecked_<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#1} as core[454b920cfc772497]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  26:     0x7f7432a10043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd5e0dcf36c8eb2ec
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  27:     0x7f7432a10043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5249b73c8953b95a
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  28:     0x7f7432a10043 - std::sys::unix::thread::Thread::new::thread_start::h680046a940e18e85
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys/unix/thread.rs:108:17
  29:     0x7f742e7068fd - <unknown>
  30:     0x7f742e788a60 - <unknown>
  31:                0x0 - <unknown>

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.68.0-nightly (0f529f0f4 2022-12-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z crate-attr=feature(generic_const_exprs)

query stack during panic:
end of query stack
thread '<unnamed>' panicked at 'panic in a function that cannot unwind', library/core/src/panicking.rs:87:58
stack backtrace:
   0:     0x7f742e9667da - std::backtrace_rs::backtrace::libunwind::trace::h7785c191eb7ee216
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f742e9667da - std::backtrace_rs::backtrace::trace_unsynchronized::hf351b38b6771dec4
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f742e9667da - std::sys_common::backtrace::_print_fmt::h713ede78758becef
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f742e9667da - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1878899793c73488
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f742e9c92ee - core::fmt::write::h13bbbc03afcba1c1
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f742e956c65 - std::io::Write::write_fmt::hfb2ca3e9f8803080
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/io/mod.rs:1682:15
   6:     0x7f742e9665a5 - std::sys_common::backtrace::_print::hd117bfadcc3f249e
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f742e9665a5 - std::sys_common::backtrace::print::h7e9c04ba80eb0074
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f742e9692ef - std::panicking::default_hook::{{closure}}::hb29d3d4cad77f77b
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:267:22
   9:     0x7f742e96902b - std::panicking::default_hook::hb9cd54f32e45cbdf
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:286:9
  10:     0x7f742e969b0c - std::panicking::rust_panic_with_hook::heec3062a77321665
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:688:13
  11:     0x7f742e969862 - std::panicking::begin_panic_handler::{{closure}}::hc198257d983dd2f7
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:577:13
  12:     0x7f742e966c8c - std::sys_common::backtrace::__rust_end_short_backtrace::he3b3e3efc14f5ea5
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:137:18
  13:     0x7f742e9695b2 - rust_begin_unwind
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:575:5
  14:     0x7f742e9c5d53 - core::panicking::panic_str_nounwind::h4573a204d9895764
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/core/src/panicking.rs:90:14
  15:     0x7f742e9c5ec3 - core::panicking::panic_no_unwind::hb01b1602c8c66cfa
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/core/src/panicking.rs:159:5
  16:     0x7f7430e1aadf - rustc_span[22b27358efe64712]::with_source_map::<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  17:     0x7f7430e1a0f5 - <scoped_tls[a9410c74fe979615]::ScopedKey<rustc_span[22b27358efe64712]::SessionGlobals>>::set::<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  18:     0x7f7430e196e2 - std[e2221f2923982408]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  19:     0x7f7431500e6e - <<std[e2221f2923982408]::thread::Builder>::spawn_unchecked_<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#1} as core[454b920cfc772497]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  20:     0x7f7432a10043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd5e0dcf36c8eb2ec
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  21:     0x7f7432a10043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5249b73c8953b95a
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  22:     0x7f7432a10043 - std::sys::unix::thread::Thread::new::thread_start::h680046a940e18e85
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys/unix/thread.rs:108:17
  23:     0x7f742e7068fd - <unknown>
  24:     0x7f742e788a60 - <unknown>
  25:                0x0 - <unknown>
thread panicked while panicking. aborting.
[1]    3664576 IOT instruction (core dumped)  rustc 79/79f1a47c3c1ced9796131aa4eb9461c27474f30c.rs  --edition=2021

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way. F-generic_const_exprs `#![feature(generic_const_exprs)]` labels Dec 14, 2022
@Nilstrieb
Copy link
Member

Can you add the #![feature] to the code example instead to make it more easily runnable in the future?

@ouz-a
Copy link
Contributor

ouz-a commented Dec 14, 2022

@rustbot claim

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. F-generic_const_exprs `#![feature(generic_const_exprs)]` 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