Skip to content

ICE: impossible case reached: can't relate: UnevaluatedConst #137260

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

Open
matthiaskrgr opened this issue Feb 19, 2025 · 2 comments
Open

ICE: impossible case reached: can't relate: UnevaluatedConst #137260

matthiaskrgr opened this issue Feb 19, 2025 · 2 comments
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) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

auto-reduced (treereduce-rust):

#![feature(generic_const_exprs)]
trait Iter<const FN: fn() = { || {} }> {}

fn needs_iter<'a, T: Iter<'a, I> + ?Sized, I: 'a>(_: &T) {}

fn test(x: &dyn Iter<'_, ()>) {
    needs_iter(x);
}

original:

//@ compile-flags: -Znext-solver
//@ check-pass

trait Iter<const FN: fn() = { || {} }>: Iterator<Item = &'a I> {}

fn needs_iter<'a, T: Iter<'a, I> + ?Sized, I: 'a>(_: &T) {}

fn test(x: &dyn Iter<'_, ()>) {
    needs_iter(x);
}

fn main() {}

Version information

rustc 1.87.0-nightly (17c1c329a 2025-02-19)
binary: rustc
commit-hash: 17c1c329a5512d718b67ef6797538b154016cd34
commit-date: 2025-02-19
host: x86_64-unknown-linux-gnu
release: 1.87.0-nightly
LLVM version: 20.1.0

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zcrate-attr=feature(generic_const_exprs)

Program output

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

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs`

error: using function pointers as const generic parameters is forbidden
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:1:22
  |
1 | trait Iter<const FN: fn() = { || {} }> {}
  |                      ^^^^
  |
  = note: the only supported types are integers, `bool`, and `char`

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:3:22
  |
3 | fn needs_iter<'a, T: Iter<'a, I> + ?Sized, I: 'a>(_: &T) {}
  |                      ^^^^ -- help: remove the lifetime argument
  |                      |
  |                      expected 0 lifetime arguments
  |
note: trait defined here, with 0 lifetime parameters
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:1:7
  |
1 | trait Iter<const FN: fn() = { || {} }> {}
  |       ^^^^

error: overly complex generic constant
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:1:29
  |
1 | trait Iter<const FN: fn() = { || {} }> {}
  |                             ^^-----^^
  |                               |
  |                               pointer casts are not allowed in generic constants
  |
  = help: consider moving this anonymous constant into a `const` function

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:5:17
  |
5 | fn test(x: &dyn Iter<'_, ()>) {
  |                 ^^^^ -- help: remove the lifetime argument
  |                 |
  |                 expected 0 lifetime arguments
  |
note: trait defined here, with 0 lifetime parameters
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:1:7
  |
1 | trait Iter<const FN: fn() = { || {} }> {}
  |       ^^^^

error[E0393]: the type parameter `FN` must be explicitly specified
 --> /tmp/icemaker_global_tempdir.ffNkrQVFC034/rustc_testrunner_tmpdir_reporting.XReiXIhsphr5/mvce.rs:5:17
  |
1 | trait Iter<const FN: fn() = { || {} }> {}
  | -------------------------------------- type parameter `FN` must be specified for this
...
5 | fn test(x: &dyn Iter<'_, ()>) {
  |                 ^^^^^^^^^^^^ missing reference to `FN`
  |
  = note: because the parameter default references `Self`, the parameter must be specified on the object type

error: internal compiler error: /rustc/17c1c329a5512d718b67ef6797538b154016cd34/compiler/rustc_middle/src/ty/relate.rs:189:18: impossible case reached: can't relate: UnevaluatedConst { def: DefId(0:5 ~ mvce[6cd1]::Iter::{constant#0}), args: [dyn [Binder { value: Trait(Iter<{type error}>), bound_vars: [] }] + '?3] } with {type error}


thread 'rustc' panicked at /rustc/17c1c329a5512d718b67ef6797538b154016cd34/compiler/rustc_middle/src/ty/relate.rs:189:18:
Box<dyn Any>
stack backtrace:
   0:     0x78000fd93754 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h058e0db08db4e308
   1:     0x78001041a2ac - core::fmt::write::h2896c353be594058
   2:     0x780011385a51 - std::io::Write::write_fmt::hb6d7e57799357016
   3:     0x78000fd935b2 - std::sys::backtrace::BacktraceLock::print::hf0f361819cf671ee
   4:     0x78000fd95dbe - std::panicking::default_hook::{{closure}}::ha203bbe1c0eab45f
   5:     0x78000fd95994 - std::panicking::default_hook::h241a0f75f184c349
   6:     0x78000eee2c77 - std[e8f7047bf536a035]::panicking::update_hook::<alloc[f5c9241a34fc739f]::boxed::Box<rustc_driver_impl[9b799b2b9a90c5eb]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x78000fd96633 - std::panicking::rust_panic_with_hook::h05db98a78b8e5ccb
   8:     0x78000ef1e321 - std[e8f7047bf536a035]::panicking::begin_panic::<rustc_errors[c739bb8b16ec05ea]::ExplicitBug>::{closure#0}
   9:     0x78000ef12736 - std[e8f7047bf536a035]::sys::backtrace::__rust_end_short_backtrace::<std[e8f7047bf536a035]::panicking::begin_panic<rustc_errors[c739bb8b16ec05ea]::ExplicitBug>::{closure#0}, !>
  10:     0x78000ef12513 - std[e8f7047bf536a035]::panicking::begin_panic::<rustc_errors[c739bb8b16ec05ea]::ExplicitBug>
  11:     0x78000ef27ca1 - <rustc_errors[c739bb8b16ec05ea]::diagnostic::BugAbort as rustc_errors[c739bb8b16ec05ea]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x78000f4f7906 - rustc_middle[85d9e04ee4b4f524]::util::bug::opt_span_bug_fmt::<rustc_span[c6f95d766fcdd5b1]::span_encoding::Span>::{closure#0}
  13:     0x78000f4e0b7a - rustc_middle[85d9e04ee4b4f524]::ty::context::tls::with_opt::<rustc_middle[85d9e04ee4b4f524]::util::bug::opt_span_bug_fmt<rustc_span[c6f95d766fcdd5b1]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x78000f4e0a0b - rustc_middle[85d9e04ee4b4f524]::ty::context::tls::with_context_opt::<rustc_middle[85d9e04ee4b4f524]::ty::context::tls::with_opt<rustc_middle[85d9e04ee4b4f524]::util::bug::opt_span_bug_fmt<rustc_span[c6f95d766fcdd5b1]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x78000db333c0 - rustc_middle[85d9e04ee4b4f524]::util::bug::bug_fmt
  16:     0x7800105bc812 - <rustc_infer[19c2b605c1a9a127]::infer::at::At>::eq_trace::<rustc_type_ir[c72b4e181bbac7a3]::predicate::TraitRef<rustc_middle[85d9e04ee4b4f524]::ty::context::TyCtxt>>
  17:     0x78000d15e2c5 - <rustc_trait_selection[5a6c0c637d1e74d2]::traits::select::SelectionContext>::match_normalize_trait_ref
  18:     0x78000d12e13f - <rustc_trait_selection[5a6c0c637d1e74d2]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}::{closure#0}
  19:     0x78000cd60446 - <rustc_trait_selection[5a6c0c637d1e74d2]::traits::select::SelectionContext>::poly_select::{closure#0}
  20:     0x780010da98e7 - <rustc_trait_selection[5a6c0c637d1e74d2]::traits::fulfill::FulfillProcessor as rustc_data_structures[f70c9a795d99fea2]::obligation_forest::ObligationProcessor>::process_obligation
  21:     0x78001040f13f - <rustc_data_structures[f70c9a795d99fea2]::obligation_forest::ObligationForest<rustc_trait_selection[5a6c0c637d1e74d2]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[5a6c0c637d1e74d2]::traits::fulfill::FulfillProcessor>
  22:     0x78001059c12d - <rustc_hir_typeck[6b1c2ee04c45e7a8]::fn_ctxt::FnCtxt>::confirm_builtin_call
  23:     0x780011016863 - <rustc_hir_typeck[6b1c2ee04c45e7a8]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  24:     0x78001100f94b - <rustc_hir_typeck[6b1c2ee04c45e7a8]::fn_ctxt::FnCtxt>::check_expr_block
  25:     0x78001101750f - <rustc_hir_typeck[6b1c2ee04c45e7a8]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  26:     0x7800106e85a0 - rustc_hir_typeck[6b1c2ee04c45e7a8]::check::check_fn
  27:     0x7800106f12bf - rustc_hir_typeck[6b1c2ee04c45e7a8]::typeck_with_inspect::{closure#0}
  28:     0x7800106ef388 - rustc_query_impl[86fa617db73557a2]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[86fa617db73557a2]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85d9e04ee4b4f524]::query::erase::Erased<[u8; 8usize]>>
  29:     0x7800107c6b8c - rustc_query_system[b2c9516ca03027bf]::query::plumbing::try_execute_query::<rustc_query_impl[86fa617db73557a2]::DynamicConfig<rustc_data_structures[f70c9a795d99fea2]::vec_cache::VecCache<rustc_span[c6f95d766fcdd5b1]::def_id::LocalDefId, rustc_middle[85d9e04ee4b4f524]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[b2c9516ca03027bf]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[86fa617db73557a2]::plumbing::QueryCtxt, false>
  30:     0x7800107c565c - rustc_query_impl[86fa617db73557a2]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7800107c52ff - <rustc_middle[85d9e04ee4b4f524]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[de8b4722af89528a]::check_crate::{closure#3}>::{closure#0}
  32:     0x7800107c4979 - rustc_hir_analysis[de8b4722af89528a]::check_crate
  33:     0x7800107ce75c - rustc_interface[d30adf414c41a3da]::passes::run_required_analyses
  34:     0x7800113819fa - rustc_interface[d30adf414c41a3da]::passes::analysis
  35:     0x7800113819d9 - rustc_query_impl[86fa617db73557a2]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[86fa617db73557a2]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85d9e04ee4b4f524]::query::erase::Erased<[u8; 0usize]>>
  36:     0x78001140c483 - rustc_query_system[b2c9516ca03027bf]::query::plumbing::try_execute_query::<rustc_query_impl[86fa617db73557a2]::DynamicConfig<rustc_query_system[b2c9516ca03027bf]::query::caches::SingleCache<rustc_middle[85d9e04ee4b4f524]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[86fa617db73557a2]::plumbing::QueryCtxt, false>
  37:     0x78001140c153 - rustc_query_impl[86fa617db73557a2]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  38:     0x78001149117c - rustc_interface[d30adf414c41a3da]::passes::create_and_enter_global_ctxt::<core[f14dc92e3f316e7]::option::Option<rustc_interface[d30adf414c41a3da]::queries::Linker>, rustc_driver_impl[9b799b2b9a90c5eb]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  39:     0x780011484a6b - rustc_interface[d30adf414c41a3da]::interface::run_compiler::<(), rustc_driver_impl[9b799b2b9a90c5eb]::run_compiler::{closure#0}>::{closure#1}
  40:     0x780011309c48 - std[e8f7047bf536a035]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[d30adf414c41a3da]::util::run_in_thread_with_globals<rustc_interface[d30adf414c41a3da]::util::run_in_thread_pool_with_globals<rustc_interface[d30adf414c41a3da]::interface::run_compiler<(), rustc_driver_impl[9b799b2b9a90c5eb]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  41:     0x78001130a074 - <<std[e8f7047bf536a035]::thread::Builder>::spawn_unchecked_<rustc_interface[d30adf414c41a3da]::util::run_in_thread_with_globals<rustc_interface[d30adf414c41a3da]::util::run_in_thread_pool_with_globals<rustc_interface[d30adf414c41a3da]::interface::run_compiler<(), rustc_driver_impl[9b799b2b9a90c5eb]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[f14dc92e3f316e7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x78001130aa2f - std::sys::pal::unix::thread::Thread::new::thread_start::had6426447ba59d7e
  43:     0x78000b6a370a - <unknown>
  44:     0x78000b727aac - <unknown>
  45:                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.87.0-nightly (17c1c329a 2025-02-19) running on x86_64-unknown-linux-gnu

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

query stack during panic:
#0 [typeck] type-checking `test`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 7 previous errors; 1 warning emitted

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

@rustbot label +F-generic_const_exprs

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

bisects to #135971

@theemathas
Copy link
Contributor

Smaller:

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

trait Iter<const N: usize = { 1 + true }> {}

fn needs_iter<const N: usize, T: Iter<N>>() {}

fn test() {
    needs_iter::<1, dyn Iter<()>>();
}
Error output
error[E0747]: type provided when a constant was expected
 --> src/lib.rs:9:30
  |
9 |     needs_iter::<1, dyn Iter<()>>();
  |                              ^^

error[E0393]: the type parameter `N` must be explicitly specified
 --> src/lib.rs:9:25
  |
4 | trait Iter<const N: usize = { 1 + true }> {}
  | ----------------------------------------- type parameter `N` must be specified for this
...
9 |     needs_iter::<1, dyn Iter<()>>();
  |                         ^^^^^^^^ missing reference to `N`
  |
  = note: because the parameter default references `Self`, the parameter must be specified on the object type

error: internal compiler error: /rustc/827a0d638dabc9a22c56f9c37a557568f86ac76c/compiler/rustc_middle/src/ty/relate.rs:189:18: impossible case reached: can't relate: 1_usize with {type error}


thread 'rustc' panicked at /rustc/827a0d638dabc9a22c56f9c37a557568f86ac76c/compiler/rustc_middle/src/ty/relate.rs:189:18:
Box<dyn Any>
stack backtrace:
   0:     0x7fa2e1188294 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h811af63f8a7fc734
   1:     0x7fa2e181a26c - core::fmt::write::hc7b1edd4711348bf
   2:     0x7fa2e27a15d1 - std::io::Write::write_fmt::h3d649f6eec18f44f
   3:     0x7fa2e11880f2 - std::sys::backtrace::BacktraceLock::print::hdd44fa6fd21f17de
   4:     0x7fa2e118a8fe - std::panicking::default_hook::{{closure}}::h020b2dd5075a08e8
   5:     0x7fa2e118a4d4 - std::panicking::default_hook::hce232139589ad2cb
   6:     0x7fa2e02d9b27 - std[9449c5a94c140f22]::panicking::update_hook::<alloc[ef07ccb132c8d950]::boxed::Box<rustc_driver_impl[c352c7cd004e9b82]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7fa2e118b173 - std::panicking::rust_panic_with_hook::h4eec9694fc71d995
   8:     0x7fa2e03151d1 - std[9449c5a94c140f22]::panicking::begin_panic::<rustc_errors[15be456994e0f50b]::ExplicitBug>::{closure#0}
   9:     0x7fa2e03095e6 - std[9449c5a94c140f22]::sys::backtrace::__rust_end_short_backtrace::<std[9449c5a94c140f22]::panicking::begin_panic<rustc_errors[15be456994e0f50b]::ExplicitBug>::{closure#0}, !>
  10:     0x7fa2e03093c7 - std[9449c5a94c140f22]::panicking::begin_panic::<rustc_errors[15be456994e0f50b]::ExplicitBug>
  11:     0x7fa2e031eb51 - <rustc_errors[15be456994e0f50b]::diagnostic::BugAbort as rustc_errors[15be456994e0f50b]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7fa2e08eacc6 - rustc_middle[900b62f28ae0cf49]::util::bug::opt_span_bug_fmt::<rustc_span[229e1aa1f66f6860]::span_encoding::Span>::{closure#0}
  13:     0x7fa2e08d3f3a - rustc_middle[900b62f28ae0cf49]::ty::context::tls::with_opt::<rustc_middle[900b62f28ae0cf49]::util::bug::opt_span_bug_fmt<rustc_span[229e1aa1f66f6860]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7fa2e08d3dcb - rustc_middle[900b62f28ae0cf49]::ty::context::tls::with_context_opt::<rustc_middle[900b62f28ae0cf49]::ty::context::tls::with_opt<rustc_middle[900b62f28ae0cf49]::util::bug::opt_span_bug_fmt<rustc_span[229e1aa1f66f6860]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7fa2def6bde0 - rustc_middle[900b62f28ae0cf49]::util::bug::bug_fmt
  16:     0x7fa2e19caf92 - <rustc_infer[a96d12e44b524d11]::infer::at::At>::eq_trace::<rustc_type_ir[70cb0c176189f28b]::predicate::TraitRef<rustc_middle[900b62f28ae0cf49]::ty::context::TyCtxt>>
  17:     0x7fa2de4fff75 - <rustc_trait_selection[df71bdd6c7aa0ef0]::traits::select::SelectionContext>::match_normalize_trait_ref
  18:     0x7fa2de4cfdcf - <rustc_trait_selection[df71bdd6c7aa0ef0]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}::{closure#0}
  19:     0x7fa2de15f5e5 - <rustc_trait_selection[df71bdd6c7aa0ef0]::traits::select::SelectionContext>::poly_select::{closure#0}
  20:     0x7fa2e2180968 - <rustc_trait_selection[df71bdd6c7aa0ef0]::traits::fulfill::FulfillProcessor as rustc_data_structures[f1d4f95ccaf35a40]::obligation_forest::ObligationProcessor>::process_obligation
  21:     0x7fa2e180f018 - <rustc_data_structures[f1d4f95ccaf35a40]::obligation_forest::ObligationForest<rustc_trait_selection[df71bdd6c7aa0ef0]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[df71bdd6c7aa0ef0]::traits::fulfill::FulfillProcessor>
  22:     0x7fa2e19aa92d - <rustc_hir_typeck[28d9f92a2b4a0999]::fn_ctxt::FnCtxt>::confirm_builtin_call
  23:     0x7fa2e25735e3 - <rustc_hir_typeck[28d9f92a2b4a0999]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  24:     0x7fa2e256c6d7 - <rustc_hir_typeck[28d9f92a2b4a0999]::fn_ctxt::FnCtxt>::check_expr_block
  25:     0x7fa2e257428f - <rustc_hir_typeck[28d9f92a2b4a0999]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  26:     0x7fa2e1ffed60 - rustc_hir_typeck[28d9f92a2b4a0999]::check::check_fn
  27:     0x7fa2e2007a7f - rustc_hir_typeck[28d9f92a2b4a0999]::typeck_with_inspect::{closure#0}
  28:     0x7fa2e2005b48 - rustc_query_impl[38130da9553dcdb6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[38130da9553dcdb6]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[900b62f28ae0cf49]::query::erase::Erased<[u8; 8usize]>>
  29:     0x7fa2e1b8d54c - rustc_query_system[f449765d094508f6]::query::plumbing::try_execute_query::<rustc_query_impl[38130da9553dcdb6]::DynamicConfig<rustc_data_structures[f1d4f95ccaf35a40]::vec_cache::VecCache<rustc_span[229e1aa1f66f6860]::def_id::LocalDefId, rustc_middle[900b62f28ae0cf49]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f449765d094508f6]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[38130da9553dcdb6]::plumbing::QueryCtxt, false>
  30:     0x7fa2e1b8c01c - rustc_query_impl[38130da9553dcdb6]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7fa2e1b8bcbf - <rustc_middle[900b62f28ae0cf49]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[8f8118909e755fde]::check_crate::{closure#3}>::{closure#0}
  32:     0x7fa2e1b8b339 - rustc_hir_analysis[8f8118909e755fde]::check_crate
  33:     0x7fa2e1b9535c - rustc_interface[2e0bca65cc540535]::passes::run_required_analyses
  34:     0x7fa2e279d57a - rustc_interface[2e0bca65cc540535]::passes::analysis
  35:     0x7fa2e279d559 - rustc_query_impl[38130da9553dcdb6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[38130da9553dcdb6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[900b62f28ae0cf49]::query::erase::Erased<[u8; 0usize]>>
  36:     0x7fa2e2836543 - rustc_query_system[f449765d094508f6]::query::plumbing::try_execute_query::<rustc_query_impl[38130da9553dcdb6]::DynamicConfig<rustc_query_system[f449765d094508f6]::query::caches::SingleCache<rustc_middle[900b62f28ae0cf49]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[38130da9553dcdb6]::plumbing::QueryCtxt, false>
  37:     0x7fa2e2836213 - rustc_query_impl[38130da9553dcdb6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  38:     0x7fa2e28cc13d - rustc_interface[2e0bca65cc540535]::passes::create_and_enter_global_ctxt::<core[38d03877dd408997]::option::Option<rustc_interface[2e0bca65cc540535]::queries::Linker>, rustc_driver_impl[c352c7cd004e9b82]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  39:     0x7fa2e288432b - rustc_interface[2e0bca65cc540535]::interface::run_compiler::<(), rustc_driver_impl[c352c7cd004e9b82]::run_compiler::{closure#0}>::{closure#1}
  40:     0x7fa2e2716cc8 - std[9449c5a94c140f22]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[2e0bca65cc540535]::util::run_in_thread_with_globals<rustc_interface[2e0bca65cc540535]::util::run_in_thread_pool_with_globals<rustc_interface[2e0bca65cc540535]::interface::run_compiler<(), rustc_driver_impl[c352c7cd004e9b82]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  41:     0x7fa2e27170f4 - <<std[9449c5a94c140f22]::thread::Builder>::spawn_unchecked_<rustc_interface[2e0bca65cc540535]::util::run_in_thread_with_globals<rustc_interface[2e0bca65cc540535]::util::run_in_thread_pool_with_globals<rustc_interface[2e0bca65cc540535]::interface::run_compiler<(), rustc_driver_impl[c352c7cd004e9b82]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[38d03877dd408997]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x7fa2e2717aaf - std::sys::pal::unix::thread::Thread::new::thread_start::h0aaba973e23fd822
  43:     0x7fa2e3e29a94 - <unknown>
  44:     0x7fa2e3eb6a34 - clone
  45:                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: please attach the file at `/playground/rustc-ice-2025-02-19T06_29_01-29.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck] type-checking `test`
#1 [analysis] running analysis passes on this crate
end of query stack
Some errors have detailed explanations: E0393, E0747.
For more information about an error, try `rustc --explain E0393`.

@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 1, 2025
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Mar 9, 2025
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) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants