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: type map: left == right #126831

Closed
matthiaskrgr opened this issue Jun 22, 2024 · 2 comments · Fixed by #129208
Closed

ICE: type map: left == right #126831

matthiaskrgr opened this issue Jun 22, 2024 · 2 comments · Fixed by #129208
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. F-adt_const_params `#![feature(adt_const_params)]` 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

Code

#![feature(adt_const_params)]

    const N_ISLANDS: usize = 4;
    const N_BRIDGES: usize = 7;
    const BRIDGES: [(usize, usize); 7] = [(0, 1), (0, 1), (0, 2), (0, 3), (0, 3), (1, 2), (2, 3)];

    pub type Matrix = [[usize; N_ISLANDS]; N_ISLANDS];

    const EMPTY_MATRIX: Matrix = [[0; N_ISLANDS]; N_ISLANDS];

    const fn to_matrix() -> Matrix {
        EMPTY_MATRIX
    }

    const BRIDGE_MATRIX: [[usize; N_ISLANDS]; N_ISLANDS] = to_matrix();

    pub struct Walk<const CURRENT: usize, const REMAINING: Matrix> {
        _p: (),
    }

    impl Walk<0, BRIDGE_MATRIX> {
        pub const fn new() -> Self {
            Self { _p: () }
        }
    }

Meta

rustc --version --verbose:

f0aceed540be1d2c761c7beedf09d243f3377298 / #126817

Error output

rustc -Cdebuginfo=2 --crate-type lib

<output>
Backtrace

warning: the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
 --> ice.rs:1:12
  |
1 | #![feature(adt_const_params)]
  |            ^^^^^^^^^^^^^^^^
  |
  = note: see issue #95174 <https://github.com/rust-lang/rust/issues/95174> for more information
  = note: `#[warn(incomplete_features)]` on by default

warning: constant `N_BRIDGES` is never used
 --> ice.rs:4:11
  |
4 |     const N_BRIDGES: usize = 7;
  |           ^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: constant `BRIDGES` is never used
 --> ice.rs:5:11
  |
5 |     const BRIDGES: [(usize, usize); 7] = [(0, 1), (0, 1), (0, 2), (0, 3), (0, 3), (1, 2), (2, 3)];
  |           ^^^^^^^

thread 'rustc' panicked at compiler/rustc_codegen_llvm/src/debuginfo/metadata/type_map.rs:61:9:
assertion `left == right` failed
  left: Walk<0_usize, [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]>
 right: Walk<0_usize, [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]>
stack backtrace:
   0:     0x7f549f8aa464 - std::backtrace_rs::backtrace::libunwind::trace::h513d838fd6e9b52f
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7f549f8aa464 - std::backtrace_rs::backtrace::trace_unsynchronized::h26858272470d1308
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f549f8aa464 - std::sys::backtrace::_print_fmt::hf5afd95008208361
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/sys/backtrace.rs:68:5
   3:     0x7f549f8aa464 - <std::sys::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hac5169203caf42d0
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/sys/backtrace.rs:44:22
   4:     0x7f549f92450a - core::fmt::rt::Argument::fmt::hcf5e0e289e9e741d
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/core/src/fmt/rt.rs:165:63
   5:     0x7f549f92450a - core::fmt::write::h6a45bb9bd938f84b
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1168:21
   6:     0x7f549f89cfe9 - std::io::Write::write_fmt::ha1013dad1a9382d1
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1835:15
   7:     0x7f549f8aa21e - std::sys::backtrace::_print::h51f90144ef7cc7e3
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/sys/backtrace.rs:47:5
   8:     0x7f549f8aa21e - std::sys::backtrace::print::he71af8b2c6022bb3
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/sys/backtrace.rs:34:9
   9:     0x7f549f8c8b0a - std::panicking::default_hook::{{closure}}::h9504d5f4aabe4aaa
  10:     0x7f549f8c8747 - std::panicking::default_hook::h5d5191b8b12acda6
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:292:9
  11:     0x7f5498f23be7 - <alloc[51151a0611325855]::boxed::Box<dyn for<'a, 'b> core[8aa9a74667e0cdd2]::ops::function::Fn<(&'a std[5f9316ad84e5ff61]::panic::PanicHookInfo<'b>,), Output = ()> + core[8aa9a74667e0cdd2]::marker::Send + core[8aa9a74667e0cdd2]::marker::Sync> as core[8aa9a74667e0cdd2]::ops::function::Fn<(&std[5f9316ad84e5ff61]::panic::PanicHookInfo,)>>::call
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2076:9
  12:     0x7f5498f23be7 - rustc_driver_impl[824b9d906152947b]::install_ice_hook::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:1391:17
  13:     0x7f5498f23be7 - <alloc[51151a0611325855]::boxed::Box<rustc_driver_impl[824b9d906152947b]::install_ice_hook::{closure#0}> as core[8aa9a74667e0cdd2]::ops::function::Fn<(&dyn for<'a, 'b> core[8aa9a74667e0cdd2]::ops::function::Fn<(&'a std[5f9316ad84e5ff61]::panic::PanicHookInfo<'b>,), Output = ()> + core[8aa9a74667e0cdd2]::marker::Send + core[8aa9a74667e0cdd2]::marker::Sync, &std[5f9316ad84e5ff61]::panic::PanicHookInfo)>>::call
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2076:9
  14:     0x7f5498f23be7 - std[5f9316ad84e5ff61]::panicking::update_hook::<alloc[51151a0611325855]::boxed::Box<rustc_driver_impl[824b9d906152947b]::install_ice_hook::{closure#0}>>::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:233:47
  15:     0x7f549f8c946d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1075665b4c007205
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2076:9
  16:     0x7f549f8c946d - std::panicking::rust_panic_with_hook::hdb78b4e61eaa0f52
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:804:13
  17:     0x7f549f8aa947 - std::panicking::begin_panic_handler::{{closure}}::hfad800489eeee850
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:670:13
  18:     0x7f549f8aa6e9 - std::sys::backtrace::__rust_end_short_backtrace::ha83cd77db7cdddb0
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/sys/backtrace.rs:171:18
  19:     0x7f549f8c8db3 - rust_begin_unwind
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:661:5
  20:     0x7f549f935572 - core::panicking::panic_fmt::hddf9bf93a6600e32
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:74:14
  21:     0x7f549f935abe - core::panicking::assert_failed_inner::ha00c6f9a35128017
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:410:17
  22:     0x7f549898913f - core[8aa9a74667e0cdd2]::panicking::assert_failed::<rustc_middle[392e625772220a5a]::ty::Ty, rustc_middle[392e625772220a5a]::ty::Ty>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:365:5
  23:     0x7f5498a54daf - <rustc_codegen_llvm[8f90685380ce181f]::debuginfo::metadata::type_map::UniqueTypeId>::for_ty
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/debuginfo/metadata/type_map.rs:61:9
  24:     0x7f5498a54daf - rustc_codegen_llvm[8f90685380ce181f]::debuginfo::metadata::type_di_node
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs:439:26
  25:     0x7f5498934c5b - <rustc_codegen_llvm[8f90685380ce181f]::context::CodegenCx as rustc_codegen_ssa[837a8faf9fee78a5]::traits::debuginfo::DebugInfoMethods>::dbg_scope_fn::get_containing_scope
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs:546:37
  26:     0x7f5498a37238 - <rustc_codegen_llvm[8f90685380ce181f]::context::CodegenCx as rustc_codegen_ssa[837a8faf9fee78a5]::traits::debuginfo::DebugInfoMethods>::dbg_scope_fn
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs:327:45
  27:     0x7f5498a37077 - <rustc_codegen_llvm[8f90685380ce181f]::context::CodegenCx as rustc_codegen_ssa[837a8faf9fee78a5]::traits::debuginfo::DebugInfoMethods>::create_function_debug_context
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs:302:24
  28:     0x7f54989604a7 - rustc_codegen_ssa[837a8faf9fee78a5]::mir::codegen_mir::<rustc_codegen_llvm[8f90685380ce181f]::builder::Builder>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/mod.rs:174:25
  29:     0x7f5498a91eac - rustc_codegen_ssa[837a8faf9fee78a5]::base::codegen_instance::<rustc_codegen_llvm[8f90685380ce181f]::builder::Builder>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/base.rs:388:5
  30:     0x7f54988cdcb5 - <rustc_middle[392e625772220a5a]::mir::mono::MonoItem as rustc_codegen_ssa[837a8faf9fee78a5]::mono_item::MonoItemExt>::define::<rustc_codegen_llvm[8f90685380ce181f]::builder::Builder>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mono_item.rs:106:17
  31:     0x7f54988cdcb5 - rustc_codegen_llvm[8f90685380ce181f]::base::compile_codegen_unit::module_codegen
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/base.rs:93:17
  32:     0x7f54988cbeee - <rustc_query_system[ae8f7d22de52af95]::dep_graph::graph::DepGraph<rustc_middle[392e625772220a5a]::dep_graph::DepsType>>::with_task::<rustc_middle[392e625772220a5a]::ty::context::TyCtxt, rustc_span[3df9c410b80373bf]::symbol::Symbol, rustc_codegen_ssa[837a8faf9fee78a5]::ModuleCodegen<rustc_codegen_llvm[8f90685380ce181f]::ModuleLlvm>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/dep_graph/graph.rs:291:22
  33:     0x7f54988cbeee - rustc_codegen_llvm[8f90685380ce181f]::base::compile_codegen_unit
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/base.rs:62:23
  34:     0x7f5498a9135d - <rustc_codegen_llvm[8f90685380ce181f]::LlvmCodegenBackend as rustc_codegen_ssa[837a8faf9fee78a5]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/lib.rs:131:9
  35:     0x7f5498a9135d - rustc_codegen_ssa[837a8faf9fee78a5]::base::codegen_crate::<rustc_codegen_llvm[8f90685380ce181f]::LlvmCodegenBackend>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/base.rs:748:34
  36:     0x7f5498a01313 - <rustc_codegen_llvm[8f90685380ce181f]::LlvmCodegenBackend as rustc_codegen_ssa[837a8faf9fee78a5]::traits::backend::CodegenBackend>::codegen_crate
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/lib.rs:359:18
  37:     0x7f5499db9c77 - rustc_interface[b3f3d6cf8ef69cbd]::passes::start_codegen::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:938:9
  38:     0x7f5499db9c77 - <rustc_data_structures[a6ec3e9be5d741d0]::profiling::VerboseTimingGuard>::run::<alloc[51151a0611325855]::boxed::Box<dyn core[8aa9a74667e0cdd2]::any::Any>, rustc_interface[b3f3d6cf8ef69cbd]::passes::start_codegen::{closure#0}>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:754:9
  39:     0x7f5499db9c77 - <rustc_session[561e519651fd698a]::session::Session>::time::<alloc[51151a0611325855]::boxed::Box<dyn core[8aa9a74667e0cdd2]::any::Any>, rustc_interface[b3f3d6cf8ef69cbd]::passes::start_codegen::{closure#0}>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:16:9
  40:     0x7f5499d987d5 - rustc_interface[b3f3d6cf8ef69cbd]::passes::start_codegen
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:937:19
  41:     0x7f5499eaae2a - <rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:235:35
  42:     0x7f5499eaae2a - <rustc_middle[392e625772220a5a]::ty::context::GlobalCtxt>::enter::<<rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#1}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:1292:37
  43:     0x7f5499eaae2a - rustc_middle[392e625772220a5a]::ty::context::tls::enter_context::<<rustc_middle[392e625772220a5a]::ty::context::GlobalCtxt>::enter<<rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9
  44:     0x7f5499eaae2a - <std[5f9316ad84e5ff61]::thread::local::LocalKey<core[8aa9a74667e0cdd2]::cell::Cell<*const ()>>>::try_with::<rustc_middle[392e625772220a5a]::ty::context::tls::enter_context<<rustc_middle[392e625772220a5a]::ty::context::GlobalCtxt>::enter<<rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:283:12
  45:     0x7f5499eaae2a - <std[5f9316ad84e5ff61]::thread::local::LocalKey<core[8aa9a74667e0cdd2]::cell::Cell<*const ()>>>::with::<rustc_middle[392e625772220a5a]::ty::context::tls::enter_context<<rustc_middle[392e625772220a5a]::ty::context::GlobalCtxt>::enter<<rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:260:9
  46:     0x7f5499eaae2a - rustc_middle[392e625772220a5a]::ty::context::tls::enter_context::<<rustc_middle[392e625772220a5a]::ty::context::GlobalCtxt>::enter<<rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:9
  47:     0x7f5499eaae2a - <rustc_middle[392e625772220a5a]::ty::context::GlobalCtxt>::enter::<<rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:1292:9
  48:     0x7f5499eaae2a - <rustc_interface[b3f3d6cf8ef69cbd]::queries::QueryResult<&rustc_middle[392e625772220a5a]::ty::context::GlobalCtxt>>::enter::<core[8aa9a74667e0cdd2]::result::Result<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, <rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker::{closure#0}>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:70:9
  49:     0x7f5499eaae2a - <rustc_interface[b3f3d6cf8ef69cbd]::queries::Queries>::codegen_and_build_linker
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:224:9
  50:     0x7f5498eb710e - rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}::{closure#1}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:448:26
  51:     0x7f5498eb710e - <rustc_interface[b3f3d6cf8ef69cbd]::interface::Compiler>::enter::<rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<core[8aa9a74667e0cdd2]::option::Option<rustc_interface[b3f3d6cf8ef69cbd]::queries::Linker>, rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:315:19
  52:     0x7f5498f29911 - rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:390:22
  53:     0x7f5498f29911 - rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler::<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/interface.rs:503:27
  54:     0x7f5498f29911 - rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals::<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/util.rs:154:13
  55:     0x7f5498f29911 - rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals::<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/util.rs:106:21
  56:     0x7f5498f29911 - <scoped_tls[5436c7a47c62a778]::ScopedKey<rustc_span[3df9c410b80373bf]::SessionGlobals>>::set::<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scoped-tls-1.0.1/src/lib.rs:137:9
  57:     0x7f5498f29911 - rustc_span[3df9c410b80373bf]::create_session_globals_then::<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_span/src/lib.rs:134:5
  58:     0x7f5498f654f1 - rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals::<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/util.rs:105:17
  59:     0x7f5498f654f1 - std[5f9316ad84e5ff61]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/sys/backtrace.rs:155:18
  60:     0x7f5498f670e8 - <std[5f9316ad84e5ff61]::thread::Builder>::spawn_unchecked_::<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#2}::{closure#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/thread/mod.rs:542:17
  61:     0x7f5498f670e8 - <core[8aa9a74667e0cdd2]::panic::unwind_safe::AssertUnwindSafe<<std[5f9316ad84e5ff61]::thread::Builder>::spawn_unchecked_<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#2}::{closure#0}> as core[8aa9a74667e0cdd2]::ops::function::FnOnce<()>>::call_once
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/core/src/panic/unwind_safe.rs:272:9
  62:     0x7f5498f670e8 - std[5f9316ad84e5ff61]::panicking::try::do_call::<core[8aa9a74667e0cdd2]::panic::unwind_safe::AssertUnwindSafe<<std[5f9316ad84e5ff61]::thread::Builder>::spawn_unchecked_<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#2}::{closure#0}>, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:553:40
  63:     0x7f5498f670e8 - std[5f9316ad84e5ff61]::panicking::try::<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, core[8aa9a74667e0cdd2]::panic::unwind_safe::AssertUnwindSafe<<std[5f9316ad84e5ff61]::thread::Builder>::spawn_unchecked_<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#2}::{closure#0}>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:517:19
  64:     0x7f5498f670e8 - std[5f9316ad84e5ff61]::panic::catch_unwind::<core[8aa9a74667e0cdd2]::panic::unwind_safe::AssertUnwindSafe<<std[5f9316ad84e5ff61]::thread::Builder>::spawn_unchecked_<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#2}::{closure#0}>, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/panic.rs:350:14
  65:     0x7f5498f670e8 - <std[5f9316ad84e5ff61]::thread::Builder>::spawn_unchecked_::<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#2}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/thread/mod.rs:541:30
  66:     0x7f5498f670e8 - <<std[5f9316ad84e5ff61]::thread::Builder>::spawn_unchecked_<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::util::run_in_thread_pool_with_globals<rustc_interface[b3f3d6cf8ef69cbd]::interface::run_compiler<core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>, rustc_driver_impl[824b9d906152947b]::run_compiler::{closure#0}>::{closure#1}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8aa9a74667e0cdd2]::result::Result<(), rustc_span[3df9c410b80373bf]::ErrorGuaranteed>>::{closure#2} as core[8aa9a74667e0cdd2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5
  67:     0x7f549f8de01c - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h61c44965bb10f861
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2062:9
  68:     0x7f549f8de01c - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hade3204fc14585b1
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2062:9
  69:     0x7f549f87f18b - std::sys::pal::unix::thread::Thread::new::thread_start::h7bebcc31acf7a174
                               at /home/gh-matthiaskrgr/vcs/github/rust_debug_assertions/library/std/src/sys/pal/unix/thread.rs:108:17
  70:     0x7f5494894ac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  71:     0x7f5494926850 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  72:                0x0 - <unknown>

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

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

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/tmp/tmp/rustc-ice-2024-06-22T13_59_07-4190857.txt` to your bug report

note: compiler flags: --crate-type lib -C debuginfo=2

query stack during panic:
end of query stack
warning: 3 warnings emitted

@matthiaskrgr matthiaskrgr added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) 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. F-adt_const_params `#![feature(adt_const_params)]` requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way labels Jun 22, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 22, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 23, 2024
@matthiaskrgr matthiaskrgr removed the requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way label Jul 25, 2024
@matthiaskrgr
Copy link
Member Author

I guess this is now reachable without debug assertions #127995 cc @workingjubilee

@workingjubilee
Copy link
Member

not entirely sure why that assertion fails but: good?

veluca93 added a commit to veluca93/rust that referenced this issue Aug 17, 2024
Fixes rust-lang#126831.

Without this patch, type normalization is not always idempotent, which
leads to all sorts of bugs in places that assume that normalizing a
normalized type does nothing.
jieyouxu added a commit to jieyouxu/rust that referenced this issue Aug 18, 2024
Fix order of normalization and recursion in const folding.

Fixes rust-lang#126831.

Without this patch, type normalization is not always idempotent, which leads to all sorts of bugs in places that assume that normalizing a normalized type does nothing.

Tracking issue: rust-lang#95174

r? BoxyUwU
tgross35 added a commit to tgross35/rust that referenced this issue Aug 19, 2024
Fix order of normalization and recursion in const folding.

Fixes rust-lang#126831.

Without this patch, type normalization is not always idempotent, which leads to all sorts of bugs in places that assume that normalizing a normalized type does nothing.

Tracking issue: rust-lang#95174

r? BoxyUwU
@bors bors closed this as completed in 7fd6232 Aug 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 19, 2024
Rollup merge of rust-lang#129208 - veluca93:adt_const_fix, r=BoxyUwU

Fix order of normalization and recursion in const folding.

Fixes rust-lang#126831.

Without this patch, type normalization is not always idempotent, which leads to all sorts of bugs in places that assume that normalizing a normalized type does nothing.

Tracking issue: rust-lang#95174

r? BoxyUwU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. F-adt_const_params `#![feature(adt_const_params)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants