Skip to content

Rustc ice in const closure #120446

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

Closed
Mintia11 opened this issue Jan 28, 2024 · 1 comment
Closed

Rustc ice in const closure #120446

Mintia11 opened this issue Jan 28, 2024 · 1 comment
Labels
C-bug Category: This is a bug. F-const_closures `#![feature(const_closures)]` F-effects `#![feature(effects)]` 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

@Mintia11
Copy link

Code

macro_rules! instr {
    ($name:ident, $func:ident, $detail:literal, $($argt:ty),*) => {{
        const || {
            Matcher::new(|instr, detail| {
                const ARGS: usize = [$(<$argt>::new(0).zero_extend_32()),*].len();

                let (masks, shifts) = get_arg_info::<ARGS, _>(detail);

                let mut i = 0;
                $func($(
                    <$argt>::new({
                        let mask = masks[i];
                        let shift = shifts[i];

                        #[allow(unused_assignments)] // Wtf rustc?
                        {
                            i += 1;
                        }

                        (instr & mask) >> shift
                    })
                ),*);
            }, string_to_array!($detail));
        }()
    }};
}

Meta

rustc --version --verbose:

rustc 1.77.0-nightly (88189a71e 2024-01-19)
binary: rustc
commit-hash: 88189a71e4e4376eea82ac61db6a539612eb200a
commit-date: 2024-01-19
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6

Error output

thread 'rustc' panicked at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/compiler/rustc_middle/src/ty/util.rs:849:22:
thread 'rustc' panicked at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/compiler/rustc_middle/src/ty/util.rs:849:22:
ConstContext::Maybe must have host effect param
ConstContext::Maybe must have host effect param
stack backtrace:
stack backtrace:
   0:     0x7b796818b816 - std::backtrace_rs::backtrace::libunwind::trace::he9b5424ca56bbca0
   0:     0x7e0d8d6e9816 - std::backtrace_rs::backtrace::libunwind::trace::he9b5424ca56bbca0
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7e0d8d6e9816 - std::backtrace_rs::backtrace::trace_unsynchronized::h3564b84f57da2e1b
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7e0d8d6e9816 - std::sys_common::backtrace::_print_fmt::h44ca1bab4cfe911b
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7e0d8d6e9816 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf57bf3a288fcf4bc
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:44:22
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7b796818b816 - std::backtrace_rs::backtrace::trace_unsynchronized::h3564b84f57da2e1b
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7b796818b816 - std::sys_common::backtrace::_print_fmt::h44ca1bab4cfe911b
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7b796818b816 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf57bf3a288fcf4bc
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7e0d8d73be10 - core::fmt::rt::Argument::fmt::h819418805491a499
   4:     0x7b79681dde10 - core::fmt::rt::Argument::fmt::h819418805491a499
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/fmt/rt.rs:142:9
   5:     0x7b79681dde10 - core::fmt::write::hdf7249a8a29010f3
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/fmt/mod.rs:1120:17
   6:     0x7b796817f14f - std::io::Write::write_fmt::h2bd186ffd57674cf
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/io/mod.rs:1810:15
   7:     0x7b796818b5f4 - std::sys_common::backtrace::_print::h3fd3fec21323f445
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/fmt/rt.rs:142:9
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:47:5
   5:     0x7e0d8d73be10 - core::fmt::write::hdf7249a8a29010f3
   8:     0x7b796818b5f4 - std::sys_common::backtrace::print::h63d79712d19c9376
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/fmt/mod.rs:1120:17
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:34:9
   6:     0x7e0d8d6dd14f - std::io::Write::write_fmt::h2bd186ffd57674cf
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/io/mod.rs:1810:15
   9:     0x7b796818e387 - std::panicking::default_hook::{{closure}}::h5221b22f986bd5a4
   7:     0x7e0d8d6e95f4 - std::sys_common::backtrace::_print::h3fd3fec21323f445
  10:     0x7b796818e0e9 - std::panicking::default_hook::h092cd25740c5f920
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:47:5
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:292:9
   8:     0x7e0d8d6e95f4 - std::sys_common::backtrace::print::h63d79712d19c9376
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7e0d8d6ec387 - std::panicking::default_hook::{{closure}}::h5221b22f986bd5a4
  10:     0x7e0d8d6ec0e9 - std::panicking::default_hook::h092cd25740c5f920
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:292:9
  11:     0x7e0d8a36dcdc - std[20dd01746d97080d]::panicking::update_hook::<alloc[e20806006b8c186d]::boxed::Box<rustc_driver_impl[5959fcfa8d1d1ca4]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7e0d8d6ecad6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h978c6082b45e43ce
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/alloc/src/boxed.rs:2030:9
  13:     0x7e0d8d6ecad6 - std::panicking::rust_panic_with_hook::h4c5290d4ef19b28b
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:785:13
  14:     0x7e0d8d6ec822 - std::panicking::begin_panic_handler::{{closure}}::h9a6cdc050fc1c54a
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:659:13
  15:     0x7e0d8d6e9d16 - std::sys_common::backtrace::__rust_end_short_backtrace::ha4d1156e558e4eed
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7e0d8d6ec574 - rust_begin_unwind
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:647:5
  17:     0x7e0d8d738515 - core::panicking::panic_fmt::h5f26cb9a8ff06e61
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/panicking.rs:72:14
  18:     0x7e0d8d7382c3 - core::panicking::panic_display::h9bd4f4c96b3ebad5
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/panicking.rs:196:5
  19:     0x7e0d8d7382c3 - core::panicking::panic_str::h0b2ad3e0a745b7ae
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/panicking.rs:171:5
  20:     0x7e0d8d7382c3 - core::option::expect_failed::h739c9c134852414a
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/option.rs:1988:5
  21:     0x7e0d8ba2bfc6 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::enforce_context_effects
  22:     0x7e0d8c00d47f - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_call
  23:     0x7e0d8bffd943 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  24:     0x7e0d8bfe64e3 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_block_with_expected
  25:     0x7e0d8bffdd50 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  26:     0x7e0d8c00eb72 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_call
  27:     0x7e0d8bffd943 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  28:     0x7e0d8bc4d7f4 - rustc_hir_typeck[f09ea2564451f47b]::check::check_fn
  29:     0x7e0d8bf493f6 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_closure
  30:     0x7e0d8c0007c7 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  31:     0x7e0d8bfe65a5 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_block_with_expected
  32:     0x7e0d8bffdd50 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  33:     0x7e0d8bfff367 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  34:     0x7e0d8bffe443 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  35:     0x7e0d8bfe99bc - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_decl
  36:     0x7e0d8bfe75fe - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_block_with_expected
  37:     0x7e0d8bffdd50 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  38:     0x7e0d8bc4d7f4 - rustc_hir_typeck[f09ea2564451f47b]::check::check_fn
  39:     0x7e0d8b7a199d - rustc_hir_typeck[f09ea2564451f47b]::typeck
  40:     0x7e0d8b7a0c89 - rustc_query_impl[c67c2b45fd6d76a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c67c2b45fd6d76a]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 8usize]>>
  41:     0x7e0d8bac3bcc - rustc_query_system[796ead6f43aea3ee]::query::plumbing::try_execute_query::<rustc_query_impl[c67c2b45fd6d76a]::DynamicConfig<rustc_query_system[796ead6f43aea3ee]::query::caches::VecCache<rustc_span[22bc0c0910288393]::def_id::LocalDefId, rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c67c2b45fd6d76a]::plumbing::QueryCtxt, true>
  42:     0x7e0d8b87e814 - rustc_query_impl[c67c2b45fd6d76a]::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
  43:     0x7e0d8b87e46e - <rustc_middle[a7a29c4e21e9b57]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[78382cd4123c02ec]::check_crate::{closure#5}>::{closure#0}
  44:     0x7e0d8b87cec3 - rustc_hir_analysis[78382cd4123c02ec]::check_crate
  45:     0x7e0d8c02b052 - rustc_interface[a4c2db5fc6bd6a93]::passes::analysis
  46:     0x7e0d8c02ac9f - rustc_query_impl[c67c2b45fd6d76a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c67c2b45fd6d76a]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 1usize]>>
  47:     0x7e0d8c01f3e7 - rustc_query_system[796ead6f43aea3ee]::query::plumbing::try_execute_query::<rustc_query_impl[c67c2b45fd6d76a]::DynamicConfig<rustc_query_system[796ead6f43aea3ee]::query::caches::SingleCache<rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[c67c2b45fd6d76a]::plumbing::QueryCtxt, true>
  48:     0x7e0d8c01efe0 - rustc_query_impl[c67c2b45fd6d76a]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  49:     0x7e0d8c51aeb3 - rustc_interface[a4c2db5fc6bd6a93]::interface::run_compiler::<core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>, rustc_driver_impl[5959fcfa8d1d1ca4]::run_compiler::{closure#0}>::{closure#0}
  50:     0x7e0d8c5fcdde - std[20dd01746d97080d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_with_globals<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_pool_with_globals<rustc_interface[a4c2db5fc6bd6a93]::interface::run_compiler<core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>, rustc_driver_impl[5959fcfa8d1d1ca4]::run_compiler::{closure#0}>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>
  51:     0x7e0d8c5fcc0d - <<std[20dd01746d97080d]::thread::Builder>::spawn_unchecked_<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_with_globals<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_pool_with_globals<rustc_interface[a4c2db5fc6bd6a93]::interface::run_compiler<core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>, rustc_driver_impl[5959fcfa8d1d1ca4]::run_compiler::{closure#0}>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#1} as core[7fbf663f9cc01fa9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  52:     0x7e0d8d6f63c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h476ab21e86af8c38
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/alloc/src/boxed.rs:2016:9
  53:     0x7e0d8d6f63c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h03a8c656e3f61339
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/alloc/src/boxed.rs:2016:9
  54:     0x7e0d8d6f63c5 - std::sys::pal::unix::thread::Thread::new::thread_start::h967fe69886e84602
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys/pal/unix/thread.rs:108:17
  55:     0x7e0d874aa9eb - <unknown>
  56:     0x7e0d8752e7cc - <unknown>
  57:                0x0 - <unknown>

  11:     0x7b7964d6dcdc - std[20dd01746d97080d]::panicking::update_hook::<alloc[e20806006b8c186d]::boxed::Box<rustc_driver_impl[5959fcfa8d1d1ca4]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7b796818ead6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h978c6082b45e43ce
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/alloc/src/boxed.rs:2030:9
  13:     0x7b796818ead6 - std::panicking::rust_panic_with_hook::h4c5290d4ef19b28b
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:785:13
  14:     0x7b796818e822 - std::panicking::begin_panic_handler::{{closure}}::h9a6cdc050fc1c54a
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:659:13
  15:     0x7b796818bd16 - std::sys_common::backtrace::__rust_end_short_backtrace::ha4d1156e558e4eed
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7b796818e574 - rust_begin_unwind
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/panicking.rs:647:5
  17:     0x7b79681da515 - core::panicking::panic_fmt::h5f26cb9a8ff06e61
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/panicking.rs:72:14
  18:     0x7b79681da2c3 - core::panicking::panic_display::h9bd4f4c96b3ebad5
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/panicking.rs:196:5
  19:     0x7b79681da2c3 - core::panicking::panic_str::h0b2ad3e0a745b7ae
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/panicking.rs:171:5
  20:     0x7b79681da2c3 - core::option::expect_failed::h739c9c134852414a
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/core/src/option.rs:1988:5
  21:     0x7b796642bfc6 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::enforce_context_effects
  22:     0x7b7966a0d47f - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_call
  23:     0x7b79669fd943 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  24:     0x7b79669e64e3 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_block_with_expected
  25:     0x7b79669fdd50 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  26:     0x7b7966a0eb72 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_call
  27:     0x7b79669fd943 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  28:     0x7b796664d7f4 - rustc_hir_typeck[f09ea2564451f47b]::check::check_fn
  29:     0x7b79669493f6 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_closure
  30:     0x7b7966a007c7 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  31:     0x7b79669e65a5 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_block_with_expected
  32:     0x7b79669fdd50 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  33:     0x7b79669ff367 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  34:     0x7b79669fe443 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  35:     0x7b79669e99bc - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_decl
  36:     0x7b79669e75fe - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_block_with_expected
  37:     0x7b79669fdd50 - <rustc_hir_typeck[f09ea2564451f47b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  38:     0x7b796664d7f4 - rustc_hir_typeck[f09ea2564451f47b]::check::check_fn
  39:     0x7b79661a199d - rustc_hir_typeck[f09ea2564451f47b]::typeck
  40:     0x7b79661a0c89 - rustc_query_impl[c67c2b45fd6d76a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c67c2b45fd6d76a]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 8usize]>>
  41:     0x7b79664c3bcc - rustc_query_system[796ead6f43aea3ee]::query::plumbing::try_execute_query::<rustc_query_impl[c67c2b45fd6d76a]::DynamicConfig<rustc_query_system[796ead6f43aea3ee]::query::caches::VecCache<rustc_span[22bc0c0910288393]::def_id::LocalDefId, rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c67c2b45fd6d76a]::plumbing::QueryCtxt, true>
  42:     0x7b796627e814 - rustc_query_impl[c67c2b45fd6d76a]::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
  43:     0x7b796627e46e - <rustc_middle[a7a29c4e21e9b57]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[78382cd4123c02ec]::check_crate::{closure#5}>::{closure#0}
  44:     0x7b796627cec3 - rustc_hir_analysis[78382cd4123c02ec]::check_crate
  45:     0x7b7966a2b052 - rustc_interface[a4c2db5fc6bd6a93]::passes::analysis
  46:     0x7b7966a2ac9f - rustc_query_impl[c67c2b45fd6d76a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c67c2b45fd6d76a]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 1usize]>>
  47:     0x7b7966a1f3e7 - rustc_query_system[796ead6f43aea3ee]::query::plumbing::try_execute_query::<rustc_query_impl[c67c2b45fd6d76a]::DynamicConfig<rustc_query_system[796ead6f43aea3ee]::query::caches::SingleCache<rustc_middle[a7a29c4e21e9b57]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[c67c2b45fd6d76a]::plumbing::QueryCtxt, true>
  48:     0x7b7966a1efe0 - rustc_query_impl[c67c2b45fd6d76a]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  49:     0x7b7966f1aeb3 - rustc_interface[a4c2db5fc6bd6a93]::interface::run_compiler::<core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>, rustc_driver_impl[5959fcfa8d1d1ca4]::run_compiler::{closure#0}>::{closure#0}
  50:     0x7b7966ffcdde - std[20dd01746d97080d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_with_globals<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_pool_with_globals<rustc_interface[a4c2db5fc6bd6a93]::interface::run_compiler<core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>, rustc_driver_impl[5959fcfa8d1d1ca4]::run_compiler::{closure#0}>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>
  51:     0x7b7966ffcc0d - <<std[20dd01746d97080d]::thread::Builder>::spawn_unchecked_<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_with_globals<rustc_interface[a4c2db5fc6bd6a93]::util::run_in_thread_pool_with_globals<rustc_interface[a4c2db5fc6bd6a93]::interface::run_compiler<core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>, rustc_driver_impl[5959fcfa8d1d1ca4]::run_compiler::{closure#0}>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7fbf663f9cc01fa9]::result::Result<(), rustc_span[22bc0c0910288393]::ErrorGuaranteed>>::{closure#1} as core[7fbf663f9cc01fa9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  52:     0x7b79681983c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h476ab21e86af8c38
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/alloc/src/boxed.rs:2016:9
  53:     0x7b79681983c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h03a8c656e3f61339
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/alloc/src/boxed.rs:2016:9
  54:     0x7b79681983c5 - std::sys::pal::unix::thread::Thread::new::thread_start::h967fe69886e84602
                               at /rustc/88189a71e4e4376eea82ac61db6a539612eb200a/library/std/src/sys/pal/unix/thread.rs:108:17
  55:     0x7b7961eaa9eb - <unknown>
  56:     0x7b7961f2e7cc - <unknown>
  57:                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 attach the file at `/home/franco/dev/saphira/rustc-ice-2024-01-28T12_26_16-27582.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [typeck] type-checking `frontend::a64_table::get_decode_table`
#1 [analysis] running analysis passes on this crate
end of query stack
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 attach the file at `/home/franco/dev/saphira/rustc-ice-2024-01-28T12_26_16-27584.txt` to your bug report

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [typeck] type-checking `frontend::a64_table::get_decode_table`
#1 [analysis] running analysis passes on this crate
end of query stack

rustc-ice-2024-01-28T12_26_16-27582.txt
rustc-ice-2024-01-28T12_26_16-27584.txt

Backtrace

<backtrace>

@Mintia11 Mintia11 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 Jan 28, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 28, 2024
@fmease fmease added F-effects `#![feature(effects)]` F-const_closures `#![feature(const_closures)]` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 28, 2024
@fmease
Copy link
Member

fmease commented Jan 28, 2024

Your reproducer is incomplete1 but anyways, this is a duplicate of #118320.

Footnotes

  1. It lacks #![feature(const_closures, effects)] which would be necessary to actually trigger this message and the macro is actually never called.

@fmease fmease closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
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-const_closures `#![feature(const_closures)]` F-effects `#![feature(effects)]` 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

No branches or pull requests

3 participants