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: None in region_errors #118021

Closed
matthiaskrgr opened this issue Nov 17, 2023 · 2 comments · Fixed by #118035
Closed

ice: None in region_errors #118021

matthiaskrgr opened this issue Nov 17, 2023 · 2 comments · Fixed by #118035
Labels
A-lifetimes Area: Lifetimes / regions 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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

snippet:

#![feature(generic_const_exprs)]

struct DataWrapper<'static> {
    data: &'a [u8; Self::SIZE],
}

impl DataWrapper<'a> {
    const SIZE: usize = 14;
}

Version information

rustc 1.76.0-nightly (f6dcaee23 2023-11-17)
binary: rustc
commit-hash: f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2
commit-date: 2023-11-17
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5

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

Program output

error[E0262]: invalid lifetime parameter name: `'static`
 --> /tmp/icemaker_global_tempdir.mZl2YMkortMG/rustc_testrunner_tmpdir_reporting.CuFFvt9ybmqS/mvce.rs:3:20
  |
3 | struct DataWrapper<'static> {
  |                    ^^^^^^^ 'static is a reserved lifetime name

error[E0261]: use of undeclared lifetime name `'a`
 --> /tmp/icemaker_global_tempdir.mZl2YMkortMG/rustc_testrunner_tmpdir_reporting.CuFFvt9ybmqS/mvce.rs:4:12
  |
3 | struct DataWrapper<'static> {
  |                    - help: consider introducing lifetime `'a` here: `'a,`
4 |     data: &'a [u8; Self::SIZE],
  |            ^^ undeclared lifetime

error[E0261]: use of undeclared lifetime name `'a`
 --> /tmp/icemaker_global_tempdir.mZl2YMkortMG/rustc_testrunner_tmpdir_reporting.CuFFvt9ybmqS/mvce.rs:7:18
  |
7 | impl DataWrapper<'a> {
  |     -            ^^ undeclared lifetime
  |     |
  |     help: consider introducing lifetime `'a` here: `<'a>`

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

thread 'rustc' panicked at compiler/rustc_borrowck/src/diagnostics/region_errors.rs:766:52:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7f02ce38b89c - std::backtrace_rs::backtrace::libunwind::trace::h7c8a4c04849c4bca
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f02ce38b89c - std::backtrace_rs::backtrace::trace_unsynchronized::h5c1670e7b31eb3db
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f02ce38b89c - std::sys_common::backtrace::_print_fmt::hc5a1d07dba171ff9
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f02ce38b89c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd3e56728c99be28f
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f02ce3de8a0 - core::fmt::rt::Argument::fmt::h2dafc216f5fb8088
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/core/src/fmt/rt.rs:142:9
   5:     0x7f02ce3de8a0 - core::fmt::write::h3b28301c5c6a19a9
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f02ce37f7bf - std::io::Write::write_fmt::hdb4afb27e1ebfe19
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/io/mod.rs:1762:15
   7:     0x7f02ce38b684 - std::sys_common::backtrace::_print::ha5532fe831234f2d
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f02ce38b684 - std::sys_common::backtrace::print::h308fa35ea0c25feb
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f02ce38e317 - std::panicking::default_hook::{{closure}}::h8efad01db635fc87
  10:     0x7f02ce38e07f - std::panicking::default_hook::h2066017ea34adbfe
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/panicking.rs:292:9
  11:     0x7f02d10e0520 - std[8fbaaf1b774571b4]::panicking::update_hook::<alloc[b612d138b68a558e]::boxed::Box<rustc_driver_impl[82aa2fb401bf99de]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f02ce38ea58 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h0fbe55fcace68f76
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/alloc/src/boxed.rs:2021:9
  13:     0x7f02ce38ea58 - std::panicking::rust_panic_with_hook::h1edb9da181996a87
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/panicking.rs:783:13
  14:     0x7f02ce38e779 - std::panicking::begin_panic_handler::{{closure}}::h4b91fd9d2310511e
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/panicking.rs:649:13
  15:     0x7f02ce38bd66 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb0d14bd870a97be
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7f02ce38e512 - rust_begin_unwind
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/panicking.rs:645:5
  17:     0x7f02ce3daf85 - core::panicking::panic_fmt::he894ac342f29666a
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/core/src/panicking.rs:72:14
  18:     0x7f02ce3db023 - core::panicking::panic::h875c602ae52547bc
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/core/src/panicking.rs:127:5
  19:     0x7f02d0ef7bbb - <rustc_borrowck[674ce300947b3292]::MirBorrowckCtxt>::report_general_error
  20:     0x7f02d0ef4895 - <rustc_borrowck[674ce300947b3292]::MirBorrowckCtxt>::report_region_error
  21:     0x7f02d324411c - rustc_borrowck[674ce300947b3292]::do_mir_borrowck
  22:     0x7f02d32087ca - rustc_borrowck[674ce300947b3292]::mir_borrowck
  23:     0x7f02d320826f - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 8usize]>>
  24:     0x7f02d2523043 - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::VecCache<rustc_span[653eeca0f65acc0b]::def_id::LocalDefId, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  25:     0x7f02d2522c10 - rustc_query_impl[82e0c6addd74830]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  26:     0x7f02cfcf0e3b - rustc_mir_transform[9d3f716d3108c967]::mir_drops_elaborated_and_const_checked
  27:     0x7f02d2522db5 - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 8usize]>>
  28:     0x7f02d2523043 - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::VecCache<rustc_span[653eeca0f65acc0b]::def_id::LocalDefId, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  29:     0x7f02d2522910 - rustc_query_impl[82e0c6addd74830]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  30:     0x7f02d252285c - rustc_middle[5931718466b65e65]::query::plumbing::query_get_at::<rustc_query_system[37b9810d0891eaa0]::query::caches::VecCache<rustc_span[653eeca0f65acc0b]::def_id::LocalDefId, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 8usize]>>>
  31:     0x7f02d2dd9ab4 - rustc_mir_transform[9d3f716d3108c967]::mir_for_ctfe
  32:     0x7f02d2454d0f - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::mir_for_ctfe::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 8usize]>>
  33:     0x7f02d24543d8 - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::DefaultCache<rustc_span[653eeca0f65acc0b]::def_id::DefId, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  34:     0x7f02d24539b0 - rustc_query_impl[82e0c6addd74830]::query_impl::mir_for_ctfe::get_query_non_incr::__rust_end_short_backtrace
  35:     0x7f02d32aa867 - rustc_const_eval[aacdea0c17eb095d]::const_eval::eval_queries::eval_in_interpreter
  36:     0x7f02d32aa49b - rustc_const_eval[aacdea0c17eb095d]::const_eval::eval_queries::eval_to_allocation_raw_provider
  37:     0x7f02d32aa33a - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 24usize]>>
  38:     0x7f02d2bcc58b - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::DefaultCache<rustc_middle[5931718466b65e65]::ty::ParamEnvAnd<rustc_middle[5931718466b65e65]::mir::interpret::GlobalId>, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  39:     0x7f02d2bcbf70 - rustc_query_impl[82e0c6addd74830]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  40:     0x7f02d2bcbc26 - rustc_middle[5931718466b65e65]::query::plumbing::query_get_at::<rustc_query_system[37b9810d0891eaa0]::query::caches::DefaultCache<rustc_middle[5931718466b65e65]::ty::ParamEnvAnd<rustc_middle[5931718466b65e65]::mir::interpret::GlobalId>, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 24usize]>>>
  41:     0x7f02d2bcb367 - rustc_const_eval[aacdea0c17eb095d]::const_eval::eval_to_valtree
  42:     0x7f02d2bcb2e2 - <rustc_const_eval[aacdea0c17eb095d]::provide::{closure#0} as core[850958e19d77282d]::ops::function::FnOnce<(rustc_middle[5931718466b65e65]::ty::context::TyCtxt, rustc_middle[5931718466b65e65]::ty::ParamEnvAnd<rustc_middle[5931718466b65e65]::mir::interpret::GlobalId>)>>::call_once
  43:     0x7f02d2bcb2b6 - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 24usize]>>
  44:     0x7f02d2bcb26f - <rustc_query_impl[82e0c6addd74830]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[850958e19d77282d]::ops::function::FnOnce<(rustc_middle[5931718466b65e65]::ty::context::TyCtxt, rustc_middle[5931718466b65e65]::ty::ParamEnvAnd<rustc_middle[5931718466b65e65]::mir::interpret::GlobalId>)>>::call_once
  45:     0x7f02d2bcc5a7 - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::DefaultCache<rustc_middle[5931718466b65e65]::ty::ParamEnvAnd<rustc_middle[5931718466b65e65]::mir::interpret::GlobalId>, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  46:     0x7f02d2bcbe70 - rustc_query_impl[82e0c6addd74830]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  47:     0x7f02d2d6e8e8 - rustc_middle[5931718466b65e65]::query::plumbing::query_get_at::<rustc_query_system[37b9810d0891eaa0]::query::caches::DefaultCache<rustc_middle[5931718466b65e65]::ty::ParamEnvAnd<rustc_middle[5931718466b65e65]::mir::interpret::GlobalId>, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 24usize]>>>
  48:     0x7f02d2cbba7c - <rustc_middle[5931718466b65e65]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  49:     0x7f02d0a62fef - <rustc_infer[8b3aaf9f71f4115f]::infer::InferCtxt>::const_eval_resolve
  50:     0x7f02d318543e - rustc_trait_selection[d77ce660336e34a9]::traits::const_evaluatable::is_const_evaluatable
  51:     0x7f02cf4dfb81 - <rustc_trait_selection[d77ce660336e34a9]::traits::fulfill::FulfillProcessor as rustc_data_structures[b554530385f6f34]::obligation_forest::ObligationProcessor>::process_obligation
  52:     0x7f02d240fad2 - <rustc_data_structures[b554530385f6f34]::obligation_forest::ObligationForest<rustc_trait_selection[d77ce660336e34a9]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[d77ce660336e34a9]::traits::fulfill::FulfillProcessor>
  53:     0x7f02d280386b - <rustc_trait_selection[d77ce660336e34a9]::traits::engine::ObligationCtxt>::select_all_or_error
  54:     0x7f02d2b02c18 - rustc_hir_analysis[1567231e1a21af44]::check::wfcheck::check_type_defn
  55:     0x7f02d2b944f0 - rustc_hir_analysis[1567231e1a21af44]::check::wfcheck::check_well_formed
  56:     0x7f02d2b93547 - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 1usize]>>
  57:     0x7f02d2b92c77 - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::VecCache<rustc_hir[d15bd8cece5a440e]::hir_id::OwnerId, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  58:     0x7f02d2b92a03 - rustc_query_impl[82e0c6addd74830]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  59:     0x7f02d2b91dc6 - rustc_hir_analysis[1567231e1a21af44]::check::wfcheck::check_mod_type_wf
  60:     0x7f02d2b91cfb - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 1usize]>>
  61:     0x7f02d2b90efb - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::DefaultCache<rustc_span[653eeca0f65acc0b]::def_id::LocalModDefId, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  62:     0x7f02d2b90c9b - rustc_query_impl[82e0c6addd74830]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  63:     0x7f02d29f2c5a - <rustc_middle[5931718466b65e65]::hir::map::Map>::try_par_for_each_module::<rustc_hir_analysis[1567231e1a21af44]::check_crate::{closure#4}::{closure#0}>::{closure#0}
  64:     0x7f02d29f3455 - rustc_hir_analysis[1567231e1a21af44]::check_crate
  65:     0x7f02d27db957 - rustc_interface[fc4b009f37deddd5]::passes::analysis
  66:     0x7f02d27db5b7 - rustc_query_impl[82e0c6addd74830]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82e0c6addd74830]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 1usize]>>
  67:     0x7f02d338e824 - rustc_query_system[37b9810d0891eaa0]::query::plumbing::try_execute_query::<rustc_query_impl[82e0c6addd74830]::DynamicConfig<rustc_query_system[37b9810d0891eaa0]::query::caches::SingleCache<rustc_middle[5931718466b65e65]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[82e0c6addd74830]::plumbing::QueryCtxt, false>
  68:     0x7f02d338e615 - rustc_query_impl[82e0c6addd74830]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  69:     0x7f02d3403f8f - rustc_interface[fc4b009f37deddd5]::interface::run_compiler::<core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>, rustc_driver_impl[82aa2fb401bf99de]::run_compiler::{closure#1}>::{closure#0}
  70:     0x7f02d33ba309 - std[8fbaaf1b774571b4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[fc4b009f37deddd5]::util::run_in_thread_with_globals<rustc_interface[fc4b009f37deddd5]::util::run_in_thread_pool_with_globals<rustc_interface[fc4b009f37deddd5]::interface::run_compiler<core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>, rustc_driver_impl[82aa2fb401bf99de]::run_compiler::{closure#1}>::{closure#0}, core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>>::{closure#0}, core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>>
  71:     0x7f02d33ba133 - <<std[8fbaaf1b774571b4]::thread::Builder>::spawn_unchecked_<rustc_interface[fc4b009f37deddd5]::util::run_in_thread_with_globals<rustc_interface[fc4b009f37deddd5]::util::run_in_thread_pool_with_globals<rustc_interface[fc4b009f37deddd5]::interface::run_compiler<core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>, rustc_driver_impl[82aa2fb401bf99de]::run_compiler::{closure#1}>::{closure#0}, core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>>::{closure#0}, core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[850958e19d77282d]::result::Result<(), rustc_span[653eeca0f65acc0b]::ErrorGuaranteed>>::{closure#1} as core[850958e19d77282d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  72:     0x7f02ce398915 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3bc8b1c564d5f1ff
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/alloc/src/boxed.rs:2007:9
  73:     0x7f02ce398915 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hebc1f26b945a9488
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/alloc/src/boxed.rs:2007:9
  74:     0x7f02ce398915 - std::sys::unix::thread::Thread::new::thread_start::hd19f3251f0cee40c
                               at /rustc/f6dcaee23f274dd18b391b2f0f70df6e98f1c3b2/library/std/src/sys/unix/thread.rs:108:17
  75:     0x7f02ce1899eb - <unknown>
  76:     0x7f02ce20d7cc - <unknown>
  77:                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: rustc 1.76.0-nightly (f6dcaee23 2023-11-17) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_borrowck] borrow-checking `DataWrapper::data::{constant#0}`
#1 [mir_drops_elaborated_and_const_checked] elaborating drops for `DataWrapper::data::{constant#0}`
#2 [mir_for_ctfe] caching mir of `DataWrapper::data::{constant#0}` for CTFE
#3 [eval_to_allocation_raw] const-evaluating + checking `DataWrapper::data::{constant#0}`
#4 [eval_to_valtree] evaluating type-level constant
#5 [check_well_formed] checking that `DataWrapper` is well-formed
#6 [check_mod_type_wf] checking that types are well-formed in top-level module
#7 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 4 previous errors; 1 warning emitted

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

@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. labels Nov 17, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 17, 2023
@matthiaskrgr matthiaskrgr added the F-generic_const_exprs `#![feature(generic_const_exprs)]` label Nov 17, 2023
@matthiaskrgr
Copy link
Member Author

Regression in nightly-2022-06-08

found 7 bors merge commits in the specified range
commit[0] 2022-06-06: Auto merge of #97730 - flip1995:clippyup, r=Manishearth
commit[1] 2022-06-06: Auto merge of #97809 - matthiaskrgr:rollup-ajyvjd3, r=matthiaskrgr
commit[2] 2022-06-07: Auto merge of #97801 - RalfJung:miri, r=RalfJung
commit[3] 2022-06-07: Auto merge of #95565 - jackh726:remove-borrowck-mode, r=nikomatsakis
commit[4] 2022-06-07: Auto merge of #97512 - scottmcm:add-coldcc, r=nagisa,lcnr
commit[5] 2022-06-07: Auto merge of #97825 - Dylan-DPC:rollup-ya51k1k, r=Dylan-DPC
commit[6] 2022-06-07: Auto merge of #97835 - Dylan-DPC:rollup-0ae3pwp, r=Dylan-DPC
ERROR: no CI builds available between 50b0025 and 5435ed6 within last 167 days

@matthiaskrgr
Copy link
Member Author

#95565 I guess? 🤔

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 18, 2023
@fmease fmease added the A-lifetimes Area: Lifetimes / regions label Nov 18, 2023
@bors bors closed this as completed in 4bb3ae3 Nov 21, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 21, 2023
Rollup merge of rust-lang#118035 - ouz-a:november_ice2, r=compiler-errors

Fix early param lifetimes in generic_const_exprs

In cases like below, we never actually be able to capture region name for two reasons, first `'static` becomes anonymous lifetime and second we never capture region if it doesn't have a name so this results in ICE.
```
struct DataWrapper<'static> {
    data: &'a [u8; Self::SIZE],
}

impl DataWrapper<'a> {
```

Fixes rust-lang#118021
bors pushed a commit to rust-lang/miri that referenced this issue Nov 21, 2023
Fix early param lifetimes in generic_const_exprs

In cases like below, we never actually be able to capture region name for two reasons, first `'static` becomes anonymous lifetime and second we never capture region if it doesn't have a name so this results in ICE.
```
struct DataWrapper<'static> {
    data: &'a [u8; Self::SIZE],
}

impl DataWrapper<'a> {
```

Fixes rust-lang/rust#118021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: Lifetimes / regions 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) ❄️ 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.

4 participants