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: Unexpected node AnonConst(AnonConst .. #122199

Closed
matthiaskrgr opened this issue Mar 8, 2024 · 7 comments · Fixed by #122370 or #122927
Closed

ice: Unexpected node AnonConst(AnonConst .. #122199

matthiaskrgr opened this issue Mar 8, 2024 · 7 comments · Fixed by #122370 or #122927
Assignees
Labels
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.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 8, 2024

auto-reduced (treereduce-rust):

trait Trait<const N: Trait = bar> {
    fn fnc<const N: Trait = u32>(&self) -> Trait {
        bar
    }
}

original:

trait Trait<const N: Trait = bar> {
    fn fnc<const N: Trait = u32>(&self) -> Trait {
        bar
    }
}

fn main() {}

Version information

rustc 1.78.0-nightly (42825768b 2024-03-08)
binary: rustc
commit-hash: 42825768b103c28b10ce0407749acb21d32abeec
commit-date: 2024-03-08
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zincremental-verify-ich=yes -Cincremental=<dir> -Cdebuginfo=2

Program output

error[E0403]: the name `N` is already used for a generic parameter in this item's generic parameters
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:2:18
  |
1 | trait Trait<const N: Trait = bar> {
  |                   - first use of `N`
2 |     fn fnc<const N: Trait = u32>(&self) -> Trait {
  |                  ^ already used

error[E0425]: cannot find value `bar` in this scope
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:1:30
  |
1 | trait Trait<const N: Trait = bar> {
  |                              ^^^ not found in this scope

error[E0423]: expected value, found builtin type `u32`
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:2:29
  |
2 |     fn fnc<const N: Trait = u32>(&self) -> Trait {
  |                             ^^^ not a value

error[E0425]: cannot find value `bar` in this scope
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:3:9
  |
3 |         bar
  |         ^^^ not found in this scope

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

warning: trait objects without an explicit `dyn` are deprecated
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:1:22
  |
1 | trait Trait<const N: Trait = bar> {
  |                      ^^^^^
  |
  = 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 an object-safe trait, use `dyn`
  |
1 | trait Trait<const N: dyn Trait = bar> {
  |                      +++

error[E0391]: cycle detected when computing type of `Trait::N`
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:1:22
  |
1 | trait Trait<const N: Trait = bar> {
  |                      ^^^^^
  |
  = note: ...which immediately requires computing type of `Trait::N` again
note: cycle used when computing explicit predicates of trait `Trait`
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:1:1
  |
1 | trait Trait<const N: Trait = bar> {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0391]: cycle detected when computing type of `Trait::N`
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:1:13
  |
1 | trait Trait<const N: Trait = bar> {
  |             ^^^^^^^^^^^^^^^^^^^^
  |
  = note: ...which immediately requires computing type of `Trait::N` again
note: cycle used when computing explicit predicates of trait `Trait`
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:1:1
  |
1 | trait Trait<const N: Trait = bar> {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:2:12
  |
2 |     fn fnc<const N: Trait = u32>(&self) -> Trait {
  |            ^^^^^^^^^^^^^^^^^^^^

warning: trait objects without an explicit `dyn` are deprecated
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:2:21
  |
2 |     fn fnc<const N: Trait = u32>(&self) -> Trait {
  |                     ^^^^^
  |
  = 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>
help: if this is an object-safe trait, use `dyn`
  |
2 |     fn fnc<const N: dyn Trait = u32>(&self) -> Trait {
  |                     +++

warning: trait objects without an explicit `dyn` are deprecated
 --> /tmp/icemaker_global_tempdir.Fuzdj9XXFOIb/rustc_testrunner_tmpdir_reporting.VVJ53MiD9N5T/mvce.rs:2:44
  |
2 |     fn fnc<const N: Trait = u32>(&self) -> Trait {
  |                                            ^^^^^
  |
  = 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>
help: if this is an object-safe trait, use `dyn`
  |
2 |     fn fnc<const N: Trait = u32>(&self) -> dyn Trait {
  |                                            +++

error: internal compiler error: compiler/rustc_hir_analysis/src/hir_wf_check.rs:166:25: Unexpected node AnonConst(AnonConst { hir_id: HirId(DefId(0:3 ~ mvce[3790]::Trait).5), def_id: DefId(0:5 ~ mvce[3790]::Trait::{constant#0}), body: BodyId { hir_id: HirId(DefId(0:3 ~ mvce[3790]::Trait).6) } })

thread 'rustc' panicked at compiler/rustc_middle/src/util/bug.rs:35:44:
Box<dyn Any>
stack backtrace:
   0:     0x7fad63b8ca52 - std::backtrace_rs::backtrace::libunwind::trace::hb81ad13cd64bfc9b
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7fad63b8ca52 - std::backtrace_rs::backtrace::trace_unsynchronized::h7266b94aa9789a06
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fad63b8ca52 - std::sys_common::backtrace::_print_fmt::h15b39ca0015d6c00
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7fad63b8ca52 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::haa13ced440f2d07d
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fad63bdda5c - core::fmt::rt::Argument::fmt::h7dbb614f186fb994
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/core/src/fmt/rt.rs:142:9
   5:     0x7fad63bdda5c - core::fmt::write::h4f17a10706f5276d
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/core/src/fmt/mod.rs:1153:17
   6:     0x7fad63b8155f - std::io::Write::write_fmt::h93d2bb5eb37a3d04
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/io/mod.rs:1846:15
   7:     0x7fad63b8c824 - std::sys_common::backtrace::_print::h0a1161c823f8451a
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fad63b8c824 - std::sys_common::backtrace::print::hf80c45a0c1de3d5d
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fad63b8f52b - std::panicking::default_hook::{{closure}}::h5b6fa0263c82e216
  10:     0x7fad63b8f287 - std::panicking::default_hook::h46d86705a9fa6106
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/panicking.rs:292:9
  11:     0x7fad66a604fc - std[7cf364b3dae18888]::panicking::update_hook::<alloc[fa23c4446791436]::boxed::Box<rustc_driver_impl[464e9b6ae99a7c55]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7fad63b8fc90 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h826b1cba48416c2f
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/alloc/src/boxed.rs:2030:9
  13:     0x7fad63b8fc90 - std::panicking::rust_panic_with_hook::h17d5262ee2114e65
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/panicking.rs:783:13
  14:     0x7fad66a8d504 - std[7cf364b3dae18888]::panicking::begin_panic::<rustc_errors[e3ea05ce585bf7b8]::ExplicitBug>::{closure#0}
  15:     0x7fad66a8a156 - std[7cf364b3dae18888]::sys_common::backtrace::__rust_end_short_backtrace::<std[7cf364b3dae18888]::panicking::begin_panic<rustc_errors[e3ea05ce585bf7b8]::ExplicitBug>::{closure#0}, !>
  16:     0x7fad66a85686 - std[7cf364b3dae18888]::panicking::begin_panic::<rustc_errors[e3ea05ce585bf7b8]::ExplicitBug>
  17:     0x7fad66a96a01 - <rustc_errors[e3ea05ce585bf7b8]::diagnostic::BugAbort as rustc_errors[e3ea05ce585bf7b8]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  18:     0x7fad66f14501 - rustc_middle[76c1b948944ff78f]::util::bug::opt_span_bug_fmt::<rustc_span[c544af241e7a7ac5]::span_encoding::Span>::{closure#0}
  19:     0x7fad66ef74ca - rustc_middle[76c1b948944ff78f]::ty::context::tls::with_opt::<rustc_middle[76c1b948944ff78f]::util::bug::opt_span_bug_fmt<rustc_span[c544af241e7a7ac5]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  20:     0x7fad66ef7368 - rustc_middle[76c1b948944ff78f]::ty::context::tls::with_context_opt::<rustc_middle[76c1b948944ff78f]::ty::context::tls::with_opt<rustc_middle[76c1b948944ff78f]::util::bug::opt_span_bug_fmt<rustc_span[c544af241e7a7ac5]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  21:     0x7fad65433f80 - rustc_middle[76c1b948944ff78f]::util::bug::bug_fmt
  22:     0x7fad66b91336 - rustc_hir_analysis[d896d3d7237dbf0]::hir_wf_check::diagnostic_hir_wf_check
  23:     0x7fad672849b4 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::diagnostic_hir_wf_check::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  24:     0x7fad6726cbcb - <rustc_query_impl[56f1c45a910824b3]::query_impl::diagnostic_hir_wf_check::dynamic_query::{closure#2} as core[f495a046448ffccf]::ops::function::FnOnce<(rustc_middle[76c1b948944ff78f]::ty::context::TyCtxt, (rustc_middle[76c1b948944ff78f]::ty::predicate::Predicate, rustc_middle[76c1b948944ff78f]::traits::WellFormedLoc))>>::call_once
  25:     0x7fad6831dc1d - <rustc_query_system[181c26dba87d6c1e]::query::plumbing::execute_job_incr<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<(rustc_span[c544af241e7a7ac5]::def_id::DefId, rustc_span[c544af241e7a7ac5]::def_id::DefId), rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[f495a046448ffccf]::ops::function::FnOnce<((rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<(rustc_span[c544af241e7a7ac5]::def_id::DefId, rustc_span[c544af241e7a7ac5]::def_id::DefId), rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>, false, false, false>), (rustc_span[c544af241e7a7ac5]::def_id::DefId, rustc_span[c544af241e7a7ac5]::def_id::DefId))>>::call_once
  26:     0x7fad671ecc95 - <rustc_middle[76c1b948944ff78f]::dep_graph::DepsType as rustc_query_system[181c26dba87d6c1e]::dep_graph::Deps>::with_deps::<<rustc_query_system[181c26dba87d6c1e]::dep_graph::graph::DepGraphData<rustc_middle[76c1b948944ff78f]::dep_graph::DepsType>>::with_task<(rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<(rustc_middle[76c1b948944ff78f]::ty::predicate::Predicate, rustc_middle[76c1b948944ff78f]::traits::WellFormedLoc), rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>), (rustc_middle[76c1b948944ff78f]::ty::predicate::Predicate, rustc_middle[76c1b948944ff78f]::traits::WellFormedLoc), rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>::{closure#0}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  27:     0x7fad671e5639 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<(rustc_middle[76c1b948944ff78f]::ty::predicate::Predicate, rustc_middle[76c1b948944ff78f]::traits::WellFormedLoc), rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  28:     0x7fad672ae87e - rustc_query_impl[56f1c45a910824b3]::query_impl::diagnostic_hir_wf_check::get_query_incr::__rust_end_short_backtrace
  29:     0x7fad6756de7e - <rustc_infer[e05b3e0e6d40fb52]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5abe31db9f1621f4]::traits::error_reporting::type_err_ctxt_ext::TypeErrCtxtExt>::report_selection_error
  30:     0x7fad67581931 - <rustc_infer[e05b3e0e6d40fb52]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5abe31db9f1621f4]::traits::error_reporting::type_err_ctxt_ext::InferCtxtPrivExt>::report_fulfillment_error
  31:     0x7fad6756b45d - <rustc_infer[e05b3e0e6d40fb52]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5abe31db9f1621f4]::traits::error_reporting::type_err_ctxt_ext::TypeErrCtxtExt>::report_fulfillment_errors
  32:     0x7fad6872480a - <rustc_hir_typeck[7e078dbefed215e0]::fn_ctxt::FnCtxt>::type_inference_fallback
  33:     0x7fad67f35226 - rustc_hir_typeck[7e078dbefed215e0]::typeck
  34:     0x7fad67f3451b - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  35:     0x7fad6826b280 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  36:     0x7fad68601513 - rustc_query_impl[56f1c45a910824b3]::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
  37:     0x7fad681dd274 - rustc_mir_build[950868f9070b7cfd]::thir::pattern::check_match::check_match
  38:     0x7fad681dc51f - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::check_match::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>
  39:     0x7fad6868a287 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  40:     0x7fad68689426 - rustc_query_impl[56f1c45a910824b3]::query_impl::check_match::get_query_incr::__rust_end_short_backtrace
  41:     0x7fad68224827 - rustc_mir_build[950868f9070b7cfd]::build::mir_built
  42:     0x7fad682246e9 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  43:     0x7fad6826b280 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  44:     0x7fad682699c0 - rustc_query_impl[56f1c45a910824b3]::query_impl::mir_built::get_query_incr::__rust_end_short_backtrace
  45:     0x7fad681dabfd - rustc_mir_transform[f95e05f18c8db36b]::mir_const
  46:     0x7fad681da8af - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::mir_const::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  47:     0x7fad6826b280 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  48:     0x7fad68269acc - rustc_query_impl[56f1c45a910824b3]::query_impl::mir_const::get_query_incr::__rust_end_short_backtrace
  49:     0x7fad67f32093 - rustc_middle[76c1b948944ff78f]::query::plumbing::query_get_at::<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>>
  50:     0x7fad686aae81 - rustc_mir_transform[f95e05f18c8db36b]::mir_const_qualif
  51:     0x7fad686aae33 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::mir_const_qualif::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 4usize]>>
  52:     0x7fad686a917f - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefIdCache<rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 4usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  53:     0x7fad686a8b2e - rustc_query_impl[56f1c45a910824b3]::query_impl::mir_const_qualif::get_query_incr::__rust_end_short_backtrace
  54:     0x7fad686a9e00 - rustc_middle[76c1b948944ff78f]::query::plumbing::query_get_at::<rustc_query_system[181c26dba87d6c1e]::query::caches::DefIdCache<rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 4usize]>>>
  55:     0x7fad6601aa90 - rustc_mir_transform[f95e05f18c8db36b]::mir_promoted
  56:     0x7fad683ce952 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 16usize]>>
  57:     0x7fad68808c1f - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  58:     0x7fad6880827c - rustc_query_impl[56f1c45a910824b3]::query_impl::mir_promoted::get_query_incr::__rust_end_short_backtrace
  59:     0x7fad68c13d4e - rustc_borrowck[60741cd4b81321ab]::mir_borrowck
  60:     0x7fad68c13c97 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  61:     0x7fad6826b280 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  62:     0x7fad689e0198 - rustc_query_impl[56f1c45a910824b3]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace
  63:     0x7fad684f4d55 - rustc_mir_transform[f95e05f18c8db36b]::mir_drops_elaborated_and_const_checked
  64:     0x7fad684f43fd - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  65:     0x7fad6826b280 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  66:     0x7fad67e42667 - rustc_query_impl[56f1c45a910824b3]::query_impl::mir_drops_elaborated_and_const_checked::get_query_incr::__rust_end_short_backtrace
  67:     0x7fad67f32093 - rustc_middle[76c1b948944ff78f]::query::plumbing::query_get_at::<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_span[c544af241e7a7ac5]::def_id::LocalDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>>
  68:     0x7fad68270e70 - rustc_mir_transform[f95e05f18c8db36b]::mir_for_ctfe
  69:     0x7fad67e4bd5f - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::mir_for_ctfe::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>
  70:     0x7fad680a88ad - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefIdCache<rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  71:     0x7fad680a7087 - rustc_query_impl[56f1c45a910824b3]::query_impl::mir_for_ctfe::get_query_incr::__rust_end_short_backtrace
  72:     0x7fad68ca789c - rustc_const_eval[75095ee0ca2a651c]::const_eval::eval_queries::eval_in_interpreter
  73:     0x7fad684a4728 - rustc_const_eval[75095ee0ca2a651c]::const_eval::eval_queries::eval_to_allocation_raw_provider
  74:     0x7fad684a44f6 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>
  75:     0x7fad6881a56f - <rustc_query_impl[56f1c45a910824b3]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2} as core[f495a046448ffccf]::ops::function::FnOnce<(rustc_middle[76c1b948944ff78f]::ty::context::TyCtxt, rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>)>>::call_once
  76:     0x7fad6881a5b1 - <rustc_query_system[181c26dba87d6c1e]::query::plumbing::execute_job_incr<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[f495a046448ffccf]::ops::function::FnOnce<((rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>)>>::call_once
  77:     0x7fad6881ac46 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  78:     0x7fad6881a320 - rustc_query_impl[56f1c45a910824b3]::query_impl::eval_to_allocation_raw::get_query_incr::__rust_end_short_backtrace
  79:     0x7fad684a249d - rustc_const_eval[75095ee0ca2a651c]::const_eval::valtrees::eval_to_valtree
  80:     0x7fad684a22a2 - <rustc_const_eval[75095ee0ca2a651c]::provide::{closure#0} as core[f495a046448ffccf]::ops::function::FnOnce<(rustc_middle[76c1b948944ff78f]::ty::context::TyCtxt, rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>)>>::call_once
  81:     0x7fad684a2276 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>
  82:     0x7fad684a222f - <rustc_query_impl[56f1c45a910824b3]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[f495a046448ffccf]::ops::function::FnOnce<(rustc_middle[76c1b948944ff78f]::ty::context::TyCtxt, rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>)>>::call_once
  83:     0x7fad6881a5b1 - <rustc_query_system[181c26dba87d6c1e]::query::plumbing::execute_job_incr<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[f495a046448ffccf]::ops::function::FnOnce<((rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>)>>::call_once
  84:     0x7fad6881ac46 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  85:     0x7fad6881a0f6 - rustc_query_impl[56f1c45a910824b3]::query_impl::eval_to_valtree::get_query_incr::__rust_end_short_backtrace
  86:     0x7fad684a19c6 - rustc_middle[76c1b948944ff78f]::query::plumbing::query_get_at::<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_middle[76c1b948944ff78f]::ty::ParamEnvAnd<rustc_middle[76c1b948944ff78f]::mir::interpret::GlobalId>, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 24usize]>>>
  87:     0x7fad684a15d9 - <rustc_middle[76c1b948944ff78f]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  88:     0x7fad684a0de8 - <rustc_middle[76c1b948944ff78f]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  89:     0x7fad684a0b7c - <rustc_middle[76c1b948944ff78f]::ty::consts::Const>::eval
  90:     0x7fad67f2b3e2 - <rustc_trait_selection[5abe31db9f1621f4]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f8a072fb46f53619]::fold::TypeFolder<rustc_middle[76c1b948944ff78f]::ty::context::TyCtxt>>::fold_const
  91:     0x7fad64e9dc1a - <rustc_trait_selection[5abe31db9f1621f4]::traits::fulfill::FulfillProcessor as rustc_data_structures[8a912b4c6859c9ba]::obligation_forest::ObligationProcessor>::process_obligation
  92:     0x7fad67e20d8a - <rustc_data_structures[8a912b4c6859c9ba]::obligation_forest::ObligationForest<rustc_trait_selection[5abe31db9f1621f4]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[5abe31db9f1621f4]::traits::fulfill::FulfillProcessor>
  93:     0x7fad6806dd30 - <rustc_trait_selection[5abe31db9f1621f4]::traits::engine::ObligationCtxt>::select_all_or_error
  94:     0x7fad688fd46f - rustc_hir_analysis[d896d3d7237dbf0]::check::wfcheck::check_trait
  95:     0x7fad68766fc2 - rustc_hir_analysis[d896d3d7237dbf0]::check::wfcheck::check_well_formed
  96:     0x7fad687657eb - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>
  97:     0x7fad683ec63e - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::VecCache<rustc_hir[46b5fd3e1ec3b1f6]::hir_id::OwnerId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
  98:     0x7fad683ec14d - rustc_query_impl[56f1c45a910824b3]::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
  99:     0x7fad68762b38 - rustc_hir_analysis[d896d3d7237dbf0]::check::wfcheck::check_mod_type_wf
 100:     0x7fad68762a77 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>
 101:     0x7fad68760d81 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::DefaultCache<rustc_span[c544af241e7a7ac5]::def_id::LocalModDefId, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
 102:     0x7fad685fe94a - rustc_query_impl[56f1c45a910824b3]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
 103:     0x7fad685fee4f - rustc_hir_analysis[d896d3d7237dbf0]::check_crate
 104:     0x7fad689e0585 - rustc_interface[b2647753f2d0ba7a]::passes::analysis
 105:     0x7fad689e01d9 - rustc_query_impl[56f1c45a910824b3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[56f1c45a910824b3]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>
 106:     0x7fad68b555a2 - rustc_query_system[181c26dba87d6c1e]::query::plumbing::try_execute_query::<rustc_query_impl[56f1c45a910824b3]::DynamicConfig<rustc_query_system[181c26dba87d6c1e]::query::caches::SingleCache<rustc_middle[76c1b948944ff78f]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[56f1c45a910824b3]::plumbing::QueryCtxt, true>
 107:     0x7fad68b5519c - rustc_query_impl[56f1c45a910824b3]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
 108:     0x7fad68b63e2f - rustc_interface[b2647753f2d0ba7a]::interface::run_compiler::<core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>, rustc_driver_impl[464e9b6ae99a7c55]::run_compiler::{closure#0}>::{closure#0}
 109:     0x7fad68ddd245 - std[7cf364b3dae18888]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b2647753f2d0ba7a]::util::run_in_thread_with_globals<rustc_interface[b2647753f2d0ba7a]::util::run_in_thread_pool_with_globals<rustc_interface[b2647753f2d0ba7a]::interface::run_compiler<core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>, rustc_driver_impl[464e9b6ae99a7c55]::run_compiler::{closure#0}>::{closure#0}, core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>>::{closure#0}, core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>>
 110:     0x7fad68ddd072 - <<std[7cf364b3dae18888]::thread::Builder>::spawn_unchecked_<rustc_interface[b2647753f2d0ba7a]::util::run_in_thread_with_globals<rustc_interface[b2647753f2d0ba7a]::util::run_in_thread_pool_with_globals<rustc_interface[b2647753f2d0ba7a]::interface::run_compiler<core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>, rustc_driver_impl[464e9b6ae99a7c55]::run_compiler::{closure#0}>::{closure#0}, core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>>::{closure#0}, core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f495a046448ffccf]::result::Result<(), rustc_span[c544af241e7a7ac5]::ErrorGuaranteed>>::{closure#1} as core[f495a046448ffccf]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
 111:     0x7fad63b99435 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h61ac61d1ea950619
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/alloc/src/boxed.rs:2016:9
 112:     0x7fad63b99435 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0b278747a113ae6b
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/alloc/src/boxed.rs:2016:9
 113:     0x7fad63b99435 - std::sys::pal::unix::thread::Thread::new::thread_start::h785348a9b12da980
                               at /rustc/42825768b103c28b10ce0407749acb21d32abeec/library/std/src/sys/pal/unix/thread.rs:108:17
 114:     0x7fad6398155a - <unknown>
 115:     0x7fad639fea3c - <unknown>
 116:                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: rustc 1.78.0-nightly (42825768b 2024-03-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z incremental-verify-ich=yes -C incremental=[REDACTED] -C debuginfo=2

query stack during panic:
#0 [diagnostic_hir_wf_check] performing HIR wf-checking for predicate `Binder { value: ObjectSafe(DefId(0:3 ~ mvce[3790]::Trait)), bound_vars: [] }` at item `Ty(DefId(0:5 ~ mvce[3790]::Trait::{constant#0}))`
#1 [typeck] type-checking `Trait::{constant#0}`
#2 [check_match] match-checking `Trait::{constant#0}`
#3 [mir_built] building MIR for `Trait::{constant#0}`
#4 [mir_const] preparing `Trait::{constant#0}` for borrow checking
#5 [mir_const_qualif] const checking `Trait::{constant#0}`
#6 [mir_promoted] promoting constants in MIR for `Trait::{constant#0}`
#7 [mir_borrowck] borrow-checking `Trait::{constant#0}`
#8 [mir_drops_elaborated_and_const_checked] elaborating drops for `Trait::{constant#0}`
#9 [mir_for_ctfe] caching mir of `Trait::{constant#0}` for CTFE
#10 [eval_to_allocation_raw] const-evaluating + checking `Trait::{constant#0}`
#11 [eval_to_valtree] evaluating type-level constant
#12 [check_well_formed] checking that `Trait` is well-formed
#13 [check_mod_type_wf] checking that types are well-formed in top-level module
#14 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 9 previous errors; 3 warnings emitted

Some errors have detailed explanations: E0391, E0403, E0423, E0425, E0601.
For more information about an error, try `rustc --explain E0391`.

@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 Mar 8, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 8, 2024
@matthiaskrgr
Copy link
Member Author

This seeeems to bisect to #122078 🤔 cc @gurry

@gurry
Copy link
Contributor

gurry commented Mar 9, 2024

Thanks @matthiaskrgr. Will take a look.

@rustbot claim

@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 11, 2024
@gurry
Copy link
Contributor

gurry commented Mar 12, 2024

Reduced further:

trait Trait<const N: Trait = bar> {
    fn fnc(&self) {
    }
}

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 18, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Mar 18, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 20, 2024
…davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 22, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 22, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
@bors bors closed this as completed in f5ac009 Mar 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 22, 2024
Rollup merge of rust-lang#122370 - gurry:122199-ice-unexpected-node, r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
@matthiaskrgr
Copy link
Member Author

@gurry the original (none reduced) one still ices 😅

@matthiaskrgr matthiaskrgr reopened this Mar 22, 2024
@gurry
Copy link
Contributor

gurry commented Mar 23, 2024

From what I can tell, it seems to have been fixed @matthiaskrgr : https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=08acb20454a44db397241bb6aeab04c9

Looks like I'm missing something 😟

@gurry
Copy link
Contributor

gurry commented Mar 23, 2024

I have now opened PR #122927 to test the below original reproducer:

trait Trait<const N: Trait = bar> {
    fn fnc<const N: Trait = u32>(&self) -> Trait {
        bar
    }
}

fn main() {}

workingjubilee added a commit to workingjubilee/rustc that referenced this issue Mar 23, 2024
…, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 23, 2024
…, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
@bors bors closed this as completed in aaf5f3b Mar 23, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 23, 2024
Rollup merge of rust-lang#122927 - gurry:122199-ice-unexpected-node-2, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
@gurry
Copy link
Contributor

gurry commented Mar 24, 2024

Sorry @matthiaskrgr for causing the issue to be closed via the PR merge without asking you first. If you still believe the ICE is not fixed please reopen it.

RenjiSann pushed a commit to RenjiSann/rust that referenced this issue Mar 25, 2024
…, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

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