Skip to content

ICE: cannot convert to a region vid #139738

Open
@matthiaskrgr

Description

@matthiaskrgr

snippet:

#![feature(generic_const_exprs)]
fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;

Version information

rustc 1.88.0-nightly (1bc56185e 2025-04-11)
binary: rustc
commit-hash: 1bc56185ee257ed829a0aea7abdc3b03c5fed887
commit-date: 2025-04-11
host: x86_64-unknown-linux-gnu
release: 1.88.0-nightly
LLVM version: 20.1.2

Possibly related line of code:

// errors are being emitted and 2) it leaves the happy path unaffected.
self.fr_static
}
_ => *self
.indices
.get(&r)
.unwrap_or_else(|| bug!("cannot convert `{:?}` to a region vid", r)),
}
}
/// Replaces all free regions in `value` with region vids, as
/// returned by `to_region_vid`.
fn fold_to_region_vids<T>(&self, tcx: TyCtxt<'tcx>, value: T) -> T

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

Program output

error: free function without a body
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:1
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
  |                                                                                              |
  |                                                                                              help: provide a definition for the function: `{ <body> }`

error[E0412]: cannot find type `c` in this scope
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:54
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |          -                                           ^
  |          |
  |          similarly named type parameter `U` defined here
  |
help: a type parameter with a similar name exists
  |
2 - fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
2 + fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[U; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |
help: you might be missing a type parameter
  |
2 | fn b<'a, U: 'a, c>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + '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.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/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

warning: unnecessary braces around const expression
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:57
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |                                                         ^^                         ^^
  |
  = note: `#[warn(unused_braces)]` on by default
help: remove these braces
  |
2 - fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
2 + fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; [0; (|d: &'a u8| 0, 0).1]]> + 'a>;
  |

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:95
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |                                                                                               ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs`

warning: trait objects without an explicit `dyn` are deprecated
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:22
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
  = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
  = note: `#[warn(bare_trait_objects)]` on by default
help: if this is a dyn-compatible trait, use `dyn`
  |
2 | fn b<'a, U: 'a>() -> dyn IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |                      +++

error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:22
    |
2   | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
    |                      ^^^^^^^^^^^^------------------------------------------------------------ help: remove the unnecessary generics
    |                      |
    |                      expected 0 generic arguments
    |
note: trait defined here, with 0 generic parameters
   --> /home/matthias/.rustup/toolchains/master/lib/rustlib/src/rust/library/core/src/iter/traits/collect.rs:285:11
    |
285 | pub trait IntoIterator {
    |           ^^^^^^^^^^^^

error[E0191]: the value of the associated types `Item` and `IntoIter` in `IntoIterator` must be specified
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:22
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: specify the associated types: `IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a, Item = Type, IntoIter = Type>`

error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:40
    |
2   | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
    |                                        ^^^^^^^^^^^^------------------------------------ help: remove the unnecessary generics
    |                                        |
    |                                        expected 0 generic arguments
    |
note: trait defined here, with 0 generic parameters
   --> /home/matthias/.rustup/toolchains/master/lib/rustlib/src/rust/library/core/src/iter/traits/collect.rs:285:11
    |
285 | pub trait IntoIterator {
    |           ^^^^^^^^^^^^

error: overly complex generic constant
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:63
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |                                                               ^^^^^^^^^^^^^^^^^^^^ field access is not supported in generic constants
  |
  = help: consider moving this anonymous constant into a `const` function
  = note: this operation may be supported in the future

warning: unused variable: `d`
 --> /tmp/icemaker_global_tempdir.xjQnUINnYRkJ/rustc_testrunner_tmpdir_reporting.TkPHgaMoSCBr/mvce.rs:2:65
  |
2 | fn b<'a, U: 'a>() -> IntoIterator<impl IntoIterator<[c; { [0; (|d: &'a u8| 0, 0).1] }]> + 'a>;
  |                                                                 ^ help: if this is intentional, prefix it with an underscore: `_d`
  |
  = note: `#[warn(unused_variables)]` on by default

error: internal compiler error: compiler/rustc_borrowck/src/universal_regions.rs:924:36: cannot convert `'a/#2` to a region vid


thread 'rustc' panicked at compiler/rustc_borrowck/src/universal_regions.rs:924:36:
Box<dyn Any>
stack backtrace:
   0:     0x7b7b7dcae1d3 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha1a0d406ae5318b3
   1:     0x7b7b7e406091 - core::fmt::write::h0d5e9eae7d226967
   2:     0x7b7b7f831c91 - std::io::Write::write_fmt::h92dc03d2f90355cb
   3:     0x7b7b7dcae032 - std::sys::backtrace::BacktraceLock::print::hefb500e2252e3de3
   4:     0x7b7b7dcb1b1a - std::panicking::default_hook::{{closure}}::hc8f5fcb1e1b811e8
   5:     0x7b7b7dcb169f - std::panicking::default_hook::hd1ef999683fd0f91
   6:     0x7b7b7cd0de03 - std[9ae281d1a9b28dc6]::panicking::update_hook::<alloc[bd1e734024810420]::boxed::Box<rustc_driver_impl[cd9d13f10141f85d]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7b7b7dcb2393 - std::panicking::rust_panic_with_hook::hf78f6e108bdf2f89
   8:     0x7b7b7cd4cb41 - std[9ae281d1a9b28dc6]::panicking::begin_panic::<rustc_errors[6913606b7a0e40fd]::ExplicitBug>::{closure#0}
   9:     0x7b7b7cd40a56 - std[9ae281d1a9b28dc6]::sys::backtrace::__rust_end_short_backtrace::<std[9ae281d1a9b28dc6]::panicking::begin_panic<rustc_errors[6913606b7a0e40fd]::ExplicitBug>::{closure#0}, !>
  10:     0x7b7b7cd40837 - std[9ae281d1a9b28dc6]::panicking::begin_panic::<rustc_errors[6913606b7a0e40fd]::ExplicitBug>
  11:     0x7b7b7cd56f11 - <rustc_errors[6913606b7a0e40fd]::diagnostic::BugAbort as rustc_errors[6913606b7a0e40fd]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7b7b7d3a824a - rustc_middle[cd1364ce0c8092fc]::util::bug::opt_span_bug_fmt::<rustc_span[92872e93c8f40263]::span_encoding::Span>::{closure#0}
  13:     0x7b7b7d38310a - rustc_middle[cd1364ce0c8092fc]::ty::context::tls::with_opt::<rustc_middle[cd1364ce0c8092fc]::util::bug::opt_span_bug_fmt<rustc_span[92872e93c8f40263]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7b7b7d382f7b - rustc_middle[cd1364ce0c8092fc]::ty::context::tls::with_context_opt::<rustc_middle[cd1364ce0c8092fc]::ty::context::tls::with_opt<rustc_middle[cd1364ce0c8092fc]::util::bug::opt_span_bug_fmt<rustc_span[92872e93c8f40263]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7b7b7a6864b0 - rustc_middle[cd1364ce0c8092fc]::util::bug::bug_fmt
  16:     0x7b7b7e5a2ee9 - <rustc_borrowck[727efc1bea3736b9]::type_check::TypeChecker>::push_region_constraints
  17:     0x7b7b7f4695c0 - <rustc_borrowck[727efc1bea3736b9]::type_check::TypeChecker>::ascribe_user_type_skip_wf
  18:     0x7b7b7f6b0f9b - rustc_borrowck[727efc1bea3736b9]::do_mir_borrowck
  19:     0x7b7b7eab9a6b - <rustc_borrowck[727efc1bea3736b9]::root_cx::BorrowCheckRootCtxt>::get_or_insert_nested
  20:     0x7b7b7eab9d45 - <rustc_borrowck[727efc1bea3736b9]::type_check::TypeChecker>::prove_closure_bounds
  21:     0x7b7b7b5d3353 - <rustc_borrowck[727efc1bea3736b9]::type_check::TypeChecker as rustc_middle[cd1364ce0c8092fc]::mir::visit::Visitor>::visit_rvalue
  22:     0x7b7b7f851761 - <rustc_borrowck[727efc1bea3736b9]::type_check::TypeChecker as rustc_middle[cd1364ce0c8092fc]::mir::visit::Visitor>::visit_body
  23:     0x7b7b7f6af5b0 - rustc_borrowck[727efc1bea3736b9]::do_mir_borrowck
  24:     0x7b7b7f69bdd1 - rustc_borrowck[727efc1bea3736b9]::mir_borrowck
  25:     0x7b7b7f69bc79 - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>>
  26:     0x7b7b7e65d3ec - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_data_structures[6b6113a6c31505b]::vec_cache::VecCache<rustc_span[92872e93c8f40263]::def_id::LocalDefId, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[c372e7878a5d5bad]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  27:     0x7b7b7e65cd8b - rustc_query_impl[5967f2ee2602ee92]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  28:     0x7b7b7e66def8 - rustc_mir_transform[b6119c96af6957c0]::mir_drops_elaborated_and_const_checked
  29:     0x7b7b7e66d5a3 - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>>
  30:     0x7b7b7e65d3ec - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_data_structures[6b6113a6c31505b]::vec_cache::VecCache<rustc_span[92872e93c8f40263]::def_id::LocalDefId, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[c372e7878a5d5bad]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  31:     0x7b7b7e65cccf - rustc_query_impl[5967f2ee2602ee92]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  32:     0x7b7b7eefd818 - rustc_mir_transform[b6119c96af6957c0]::mir_for_ctfe
  33:     0x7b7b7eefd64d - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::mir_for_ctfe::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>>
  34:     0x7b7b7e78c96f - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_query_system[c372e7878a5d5bad]::query::caches::DefIdCache<rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  35:     0x7b7b7f13c79d - rustc_query_impl[5967f2ee2602ee92]::query_impl::mir_for_ctfe::get_query_non_incr::__rust_end_short_backtrace
  36:     0x7b7b7f13c8cd - <rustc_const_eval[57ee52d6cb9a0a3b]::interpret::eval_context::InterpCx<rustc_const_eval[57ee52d6cb9a0a3b]::const_eval::machine::CompileTimeMachine>>::load_mir
  37:     0x7b7b7f13d721 - rustc_const_eval[57ee52d6cb9a0a3b]::const_eval::eval_queries::eval_to_allocation_raw_provider
  38:     0x7b7b7f13cffe - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 24usize]>>
  39:     0x7b7b7f12cdc2 - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_query_system[c372e7878a5d5bad]::query::caches::DefaultCache<rustc_middle[cd1364ce0c8092fc]::ty::PseudoCanonicalInput<rustc_middle[cd1364ce0c8092fc]::mir::interpret::GlobalId>, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  40:     0x7b7b7f12c974 - rustc_query_impl[5967f2ee2602ee92]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7b7b7f11d0d6 - rustc_const_eval[57ee52d6cb9a0a3b]::const_eval::valtrees::eval_to_valtree
  42:     0x7b7b7f11ce94 - <rustc_const_eval[57ee52d6cb9a0a3b]::provide::{closure#0} as core[22c124abaa691b7d]::ops::function::FnOnce<(rustc_middle[cd1364ce0c8092fc]::ty::context::TyCtxt, rustc_middle[cd1364ce0c8092fc]::ty::PseudoCanonicalInput<rustc_middle[cd1364ce0c8092fc]::mir::interpret::GlobalId>)>>::call_once
  43:     0x7b7b7f11ce3e - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 24usize]>>
  44:     0x7b7b7f11cdf7 - <rustc_query_impl[5967f2ee2602ee92]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[22c124abaa691b7d]::ops::function::FnOnce<(rustc_middle[cd1364ce0c8092fc]::ty::context::TyCtxt, rustc_middle[cd1364ce0c8092fc]::ty::PseudoCanonicalInput<rustc_middle[cd1364ce0c8092fc]::mir::interpret::GlobalId>)>>::call_once
  45:     0x7b7b7f12cea5 - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_query_system[c372e7878a5d5bad]::query::caches::DefaultCache<rustc_middle[cd1364ce0c8092fc]::ty::PseudoCanonicalInput<rustc_middle[cd1364ce0c8092fc]::mir::interpret::GlobalId>, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  46:     0x7b7b7f12c886 - rustc_query_impl[5967f2ee2602ee92]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  47:     0x7b7b7ef0f7c1 - <rustc_middle[cd1364ce0c8092fc]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  48:     0x7b7b7ef0f336 - <rustc_middle[cd1364ce0c8092fc]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  49:     0x7b7b7ef0edc8 - rustc_trait_selection[319aa020fe5e5e23]::traits::try_evaluate_const
  50:     0x7b7b7db50c75 - rustc_trait_selection[319aa020fe5e5e23]::traits::evaluate_const
  51:     0x7b7b7e9300cc - <rustc_hir_typeck[9d0763d257897bd3]::fn_ctxt::FnCtxt>::try_structurally_resolve_const
  52:     0x7b7b7f06bdd2 - <rustc_hir_typeck[9d0763d257897bd3]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  53:     0x7b7b7f0598f7 - <rustc_hir_typeck[9d0763d257897bd3]::fn_ctxt::FnCtxt>::check_expr_block
  54:     0x7b7b7f0645e2 - <rustc_hir_typeck[9d0763d257897bd3]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  55:     0x7b7b7e686c36 - rustc_hir_typeck[9d0763d257897bd3]::typeck_with_inspect::{closure#0}
  56:     0x7b7b7e683036 - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>>
  57:     0x7b7b7e65d3ec - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_data_structures[6b6113a6c31505b]::vec_cache::VecCache<rustc_span[92872e93c8f40263]::def_id::LocalDefId, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[c372e7878a5d5bad]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  58:     0x7b7b7e65ce4b - rustc_query_impl[5967f2ee2602ee92]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  59:     0x7b7b7e65e548 - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::used_trait_imports::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>>
  60:     0x7b7b7e65d3ec - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_data_structures[6b6113a6c31505b]::vec_cache::VecCache<rustc_span[92872e93c8f40263]::def_id::LocalDefId, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[c372e7878a5d5bad]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  61:     0x7b7b7e65cc27 - rustc_query_impl[5967f2ee2602ee92]::query_impl::used_trait_imports::get_query_non_incr::__rust_end_short_backtrace
  62:     0x7b7b7e65c8d7 - rustc_hir_analysis[98ab9e600e914c06]::check_unused::check_unused_traits
  63:     0x7b7b7e65c7cb - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::check_unused_traits::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 0usize]>>
  64:     0x7b7b7f3666fd - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_query_system[c372e7878a5d5bad]::query::caches::SingleCache<rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  65:     0x7b7b7f3664fc - rustc_query_impl[5967f2ee2602ee92]::query_impl::check_unused_traits::get_query_non_incr::__rust_end_short_backtrace
  66:     0x7b7b7e65ba27 - rustc_hir_analysis[98ab9e600e914c06]::check_crate
  67:     0x7b7b7ee14074 - rustc_interface[df8337fb1d12619b]::passes::run_required_analyses
  68:     0x7b7b7f360c5e - rustc_interface[df8337fb1d12619b]::passes::analysis
  69:     0x7b7b7f360c33 - rustc_query_impl[5967f2ee2602ee92]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5967f2ee2602ee92]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 0usize]>>
  70:     0x7b7b7f3666fd - rustc_query_system[c372e7878a5d5bad]::query::plumbing::try_execute_query::<rustc_query_impl[5967f2ee2602ee92]::DynamicConfig<rustc_query_system[c372e7878a5d5bad]::query::caches::SingleCache<rustc_middle[cd1364ce0c8092fc]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[5967f2ee2602ee92]::plumbing::QueryCtxt, false>
  71:     0x7b7b7f3663f8 - rustc_query_impl[5967f2ee2602ee92]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  72:     0x7b7b7f734afc - rustc_interface[df8337fb1d12619b]::passes::create_and_enter_global_ctxt::<core[22c124abaa691b7d]::option::Option<rustc_interface[df8337fb1d12619b]::queries::Linker>, rustc_driver_impl[cd9d13f10141f85d]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  73:     0x7b7b7f5a0c54 - rustc_interface[df8337fb1d12619b]::interface::run_compiler::<(), rustc_driver_impl[cd9d13f10141f85d]::run_compiler::{closure#0}>::{closure#1}
  74:     0x7b7b7f3c3268 - std[9ae281d1a9b28dc6]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[df8337fb1d12619b]::util::run_in_thread_with_globals<rustc_interface[df8337fb1d12619b]::util::run_in_thread_pool_with_globals<rustc_interface[df8337fb1d12619b]::interface::run_compiler<(), rustc_driver_impl[cd9d13f10141f85d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  75:     0x7b7b7f3c3b6b - <<std[9ae281d1a9b28dc6]::thread::Builder>::spawn_unchecked_<rustc_interface[df8337fb1d12619b]::util::run_in_thread_with_globals<rustc_interface[df8337fb1d12619b]::util::run_in_thread_pool_with_globals<rustc_interface[df8337fb1d12619b]::interface::run_compiler<(), rustc_driver_impl[cd9d13f10141f85d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[22c124abaa691b7d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  76:     0x7b7b7f3c4f77 - std::sys::pal::unix::thread::Thread::new::thread_start::h4d89dcdfc63a0b38
  77:     0x7b7b792a370a - <unknown>
  78:     0x7b7b79327aac - <unknown>
  79:                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 make sure that you have updated to the latest nightly

note: rustc 1.88.0-nightly (1bc56185e 2025-04-11) running on x86_64-unknown-linux-gnu

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

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

@rustbot label +F-generic_const_exprs

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions