Skip to content

ICE: no enclosing const-continuable scope found #143119

Open
@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

enum State2 {
    X,
    Z,
}

fn main() {
    let mut state1;
    let mut state2;
    let mut first;
    'a: loop {
        state1 = 'blk1: {
            match state1 {
                State1A =>
                {
                    #[loop_match]
                    loop {
                        state2 = 'blk2: {
                            match state2 {
                                State2X => {
                                    break 'blk2 {
                                        if first {
                                            'blk2: {
                                                match state2 {
                                                    State2X =>
                                                    {
                                                        #[const_continue]
                                                        break 'blk2 State2::Z
                                                    }
                                                }
                                            };
                                        }
                                        break 'blk2 State2::X;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
original code

original:

#![feature(loop_match)]
enum State2 {
    X,
    Z,
}

fn main() {
    let mut state1;
    let mut state2;
    let mut first;
    'a: loop {
        state1 = 'blk1: {
            match state1 {
                State1A =>
                {
                    #[loop_match]
                    loop {
                        state2 = 'blk2: {
                            match state2 {
                                State2X => {
                                    break 'blk2 {
                                        if first {
                                            'blk2: {
                                                match state2 {
                                                    State2X =>
                                                    {
                                                        #[const_continue]
                                                        break 'blk2 State2::Z
                                                    }
                                                }
                                            };
                                            break 'blk2 State2::X;
                                        }
                                        break 'blk2 State2::X;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

Version information

rustc 1.90.0-nightly (fe5f3dedf 2025-06-27)
binary: rustc
commit-hash: fe5f3dedf7b4d6bea2cadb17343f747d70b4c66b
commit-date: 2025-06-27
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.7

Possibly related line of code:

let break_index = self
.scopes
.const_continuable_scopes
.iter()
.rposition(|const_continuable_scope| const_continuable_scope.region_scope == scope)
.unwrap_or_else(|| span_bug!(span, "no enclosing const-continuable scope found"));
let scope = &self.scopes.const_continuable_scopes[break_index];
let state_decl = &self.local_decls[scope.state_place.as_local().unwrap()];
let state_ty = state_decl.ty;
let (discriminant_ty, rvalue) = match state_ty.kind() {

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

Program output

warning: label name `'blk2` shadows a label name that is already in scope
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:22:45
   |
17 |                         state2 = 'blk2: {
   |                                  ----- first declared here
...
22 |                                             'blk2: {
   |                                             ^^^^^ label `'blk2` already in scope

error[E0658]: the `#[loop_match]` attribute is an experimental feature
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:15:21
   |
15 |                     #[loop_match]
   |                     ^^^^^^^^^^^^^
   |
   = note: see issue #132306 <https://github.com/rust-lang/rust/issues/132306> for more information
   = help: add `#![feature(loop_match)]` to the crate attributes to enable
   = note: this compiler was built on 2025-06-27; consider upgrading it if it is out of date

error[E0658]: the `#[const_continue]` attribute is an experimental feature
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:26:57
   |
26 | ...                   #[const_continue]
   |                       ^^^^^^^^^^^^^^^^^
   |
   = note: see issue #132306 <https://github.com/rust-lang/rust/issues/132306> for more information
   = help: add `#![feature(loop_match)]` to the crate attributes to enable
   = note: this compiler was built on 2025-06-27; consider upgrading it if it is out of date

warning: this labeled break expression is easy to confuse with an unlabeled break with a labeled value expression
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:20:37
   |
20 | / ...                   break 'blk2 {
21 | | ...                       if first {
22 | | ...                           'blk2: {
23 | | ...                               match state2 {
...  |
32 | | ...                       break 'blk2 State2::X;
33 | | ...                   }
   | |_______________________^
   |
   = note: `#[warn(break_with_label_and_loop)]` on by default
help: wrap this expression in parentheses
   |
20 ~                                     break 'blk2 ({
21 |                                         if first {
...
32 |                                         break 'blk2 State2::X;
33 ~                                     })
   |

warning: unused label
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:10:5
   |
10 |     'a: loop {
   |     ^^
   |
   = note: `#[warn(unused_labels)]` on by default

warning: unused label
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:11:18
   |
11 |         state1 = 'blk1: {
   |                  ^^^^^

warning: unreachable expression
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:20:37
   |
20 | / ...                   break 'blk2 {
21 | | ...                       if first {
22 | | ...                           'blk2: {
23 | | ...                               match state2 {
...  |
32 | | ...                       break 'blk2 State2::X;
   | |                           --------------------- any code following this expression is unreachable
33 | | ...                   }
   | |_______________________^ unreachable expression
   |
   = note: `#[warn(unreachable_code)]` on by default

warning: unreachable expression
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:11:9
   |
11 | /          state1 = 'blk1: {
12 | |/             match state1 {
13 | ||                 State1A =>
14 | ||                 {
15 | ||                     #[loop_match]
...  ||
39 | ||             }
   | ||_____________- any code following this `match` expression is unreachable, as all arms diverge
40 | |          }
   | |__________^ unreachable expression

warning: unused variable: `State1A`
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:13:17
   |
13 |                 State1A =>
   |                 ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_State1A`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `State2X`
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:19:33
   |
19 | ...                   State2X => {
   |                       ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_State2X`

warning: unused variable: `State2X`
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:24:53
   |
24 | ...                   State2X =>
   |                       ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_State2X`

error: internal compiler error: compiler/rustc_mir_build/src/builder/scope.rs:898:32: no enclosing const-continuable scope found
  --> /tmp/icemaker_global_tempdir.Rpcj8X3pLXgq/rustc_testrunner_tmpdir_reporting.isi6dsSqzxeq/mvce.rs:27:57
   |
27 | ...                   break 'blk2 State2::Z
   |                       ^^^^^^^^^^^^^^^^^^^^^


thread 'rustc' panicked at compiler/rustc_mir_build/src/builder/scope.rs:898:32:
Box<dyn Any>
stack backtrace:
   0:     0x7657bab096f3 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h48b24be8297e4a9c
   1:     0x7657bb202c37 - core::fmt::write::h44ef114fca1e3410
   2:     0x7657baaff213 - std::io::Write::write_fmt::h48f3596bb626dcaa
   3:     0x7657bab09552 - std::sys::backtrace::BacktraceLock::print::h08fe9f4d0c0a723f
   4:     0x7657bab0d04a - std::panicking::default_hook::{{closure}}::h470a325c2f4bb1be
   5:     0x7657bab0cbcf - std::panicking::default_hook::h375895b5d6b84766
   6:     0x7657b9bea173 - std[7a7d327c4bb6bc11]::panicking::update_hook::<alloc[95fe608572e1da2a]::boxed::Box<rustc_driver_impl[1d35d6f9d2799e05]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7657bab0d89b - std::panicking::rust_panic_with_hook::h3f9361c44c0dd63d
   8:     0x7657b9c24261 - std[7a7d327c4bb6bc11]::panicking::begin_panic::<rustc_errors[46b8c952c97445c4]::ExplicitBug>::{closure#0}
   9:     0x7657b9c18936 - std[7a7d327c4bb6bc11]::sys::backtrace::__rust_end_short_backtrace::<std[7a7d327c4bb6bc11]::panicking::begin_panic<rustc_errors[46b8c952c97445c4]::ExplicitBug>::{closure#0}, !>
  10:     0x7657b9c15139 - std[7a7d327c4bb6bc11]::panicking::begin_panic::<rustc_errors[46b8c952c97445c4]::ExplicitBug>
  11:     0x7657b9c2dd41 - <rustc_errors[46b8c952c97445c4]::diagnostic::BugAbort as rustc_errors[46b8c952c97445c4]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7657ba16348c - <rustc_errors[46b8c952c97445c4]::DiagCtxtHandle>::span_bug::<rustc_span[dd092a92122222c1]::span_encoding::Span, alloc[95fe608572e1da2a]::string::String>
  13:     0x7657ba1f6ba7 - rustc_middle[421a23b7571f26a5]::util::bug::opt_span_bug_fmt::<rustc_span[dd092a92122222c1]::span_encoding::Span>::{closure#0}
  14:     0x7657ba1d66ba - rustc_middle[421a23b7571f26a5]::ty::context::tls::with_opt::<rustc_middle[421a23b7571f26a5]::util::bug::opt_span_bug_fmt<rustc_span[dd092a92122222c1]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:     0x7657ba1d652b - rustc_middle[421a23b7571f26a5]::ty::context::tls::with_context_opt::<rustc_middle[421a23b7571f26a5]::ty::context::tls::with_opt<rustc_middle[421a23b7571f26a5]::util::bug::opt_span_bug_fmt<rustc_span[dd092a92122222c1]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  16:     0x7657b7caa2b7 - rustc_middle[421a23b7571f26a5]::util::bug::span_bug_fmt::<rustc_span[dd092a92122222c1]::span_encoding::Span>
  17:     0x7657bb7969b2 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::stmt_expr
  18:     0x7657bb782227 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  19:     0x7657bb773973 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_temp::{closure#0}
  20:     0x7657bb781698 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  21:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  22:     0x7657bc1fd883 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  23:     0x7657bc1fb605 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  24:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  25:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  26:     0x7657bb790ae5 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::lower_match_arms
  27:     0x7657bb781a77 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  28:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  29:     0x7657bc1fd883 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  30:     0x7657bc1fba6e - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  31:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  32:     0x7657bb773973 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_temp::{closure#0}
  33:     0x7657bb7955f6 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::stmt_expr
  34:     0x7657bb7954c7 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::stmt_expr
  35:     0x7657bc1fc320 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  36:     0x7657bc1fb605 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  37:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  38:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  39:     0x7657bb7824b1 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  40:     0x7657bb773973 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_temp::{closure#0}
  41:     0x7657bb7955f6 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::stmt_expr
  42:     0x7657bb7954c7 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::stmt_expr
  43:     0x7657bc1fc320 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  44:     0x7657bc1fb605 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  45:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  46:     0x7657bb773973 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_temp::{closure#0}
  47:     0x7657bb781698 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  48:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  49:     0x7657bb793818 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::break_scope
  50:     0x7657bb795520 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::stmt_expr
  51:     0x7657bb782227 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  52:     0x7657bb773973 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_temp::{closure#0}
  53:     0x7657bb781698 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  54:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  55:     0x7657bc1fd883 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  56:     0x7657bc1fb605 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  57:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  58:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  59:     0x7657bb790ae5 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::lower_match_arms
  60:     0x7657ba2653f7 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::in_breakable_scope::<<rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest::{closure#4}>
  61:     0x7657bb78894f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  62:     0x7657bb773973 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_temp::{closure#0}
  63:     0x7657bb781698 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  64:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  65:     0x7657bc1fd883 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  66:     0x7657bc1fb605 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  67:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  68:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  69:     0x7657bb790ae5 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::lower_match_arms
  70:     0x7657bb781a77 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  71:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  72:     0x7657bc1fd883 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  73:     0x7657bc1fba6e - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  74:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  75:     0x7657bb76c01d - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_operand
  76:     0x7657bb765df4 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_rvalue
  77:     0x7657bb76632d - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_rvalue
  78:     0x7657bb795bd0 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::stmt_expr
  79:     0x7657bb785217 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  80:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  81:     0x7657bc1fd883 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  82:     0x7657bc1fb605 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  83:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  84:     0x7657bb7835b9 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  85:     0x7657bb773973 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::as_temp::{closure#0}
  86:     0x7657bb781698 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  87:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  88:     0x7657bc1fd883 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block_stmts
  89:     0x7657bc1fb605 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::ast_block
  90:     0x7657bb780603 - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  91:     0x7657bb77fd6f - <rustc_mir_build[4861131aeeb73c8e]::builder::Builder>::expr_into_dest
  92:     0x7657bb79b1cf - rustc_mir_build[4861131aeeb73c8e]::builder::build_mir
  93:     0x7657bb208576 - rustc_mir_transform[b2f77d71f9750d52]::mir_built
  94:     0x7657bb208547 - rustc_query_impl[a46554db2076a7e1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a46554db2076a7e1]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[421a23b7571f26a5]::query::erase::Erased<[u8; 8usize]>>
  95:     0x7657bb40bcee - rustc_query_system[9da031a4e4fdb32b]::query::plumbing::try_execute_query::<rustc_query_impl[a46554db2076a7e1]::DynamicConfig<rustc_data_structures[d5f78031b72118ca]::vec_cache::VecCache<rustc_span[dd092a92122222c1]::def_id::LocalDefId, rustc_middle[421a23b7571f26a5]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[9da031a4e4fdb32b]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[a46554db2076a7e1]::plumbing::QueryCtxt, false>
  96:     0x7657bb40b749 - rustc_query_impl[a46554db2076a7e1]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  97:     0x7657bbc3242a - rustc_mir_build[4861131aeeb73c8e]::check_unsafety::check_unsafety
  98:     0x7657bbc321a3 - rustc_query_impl[a46554db2076a7e1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a46554db2076a7e1]::query_impl::check_unsafety::dynamic_query::{closure#2}::{closure#0}, rustc_middle[421a23b7571f26a5]::query::erase::Erased<[u8; 0usize]>>
  99:     0x7657bbc317b9 - rustc_query_system[9da031a4e4fdb32b]::query::plumbing::try_execute_query::<rustc_query_impl[a46554db2076a7e1]::DynamicConfig<rustc_data_structures[d5f78031b72118ca]::vec_cache::VecCache<rustc_span[dd092a92122222c1]::def_id::LocalDefId, rustc_middle[421a23b7571f26a5]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[9da031a4e4fdb32b]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[a46554db2076a7e1]::plumbing::QueryCtxt, false>
 100:     0x7657bbc31495 - rustc_query_impl[a46554db2076a7e1]::query_impl::check_unsafety::get_query_non_incr::__rust_end_short_backtrace
 101:     0x7657bb40a521 - <rustc_middle[421a23b7571f26a5]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface[b6aba49ee050940e]::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
 102:     0x7657bb407ef2 - rustc_interface[b6aba49ee050940e]::passes::analysis
 103:     0x7657bb4073cb - rustc_query_impl[a46554db2076a7e1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a46554db2076a7e1]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[421a23b7571f26a5]::query::erase::Erased<[u8; 0usize]>>
 104:     0x7657bc2b113c - rustc_query_system[9da031a4e4fdb32b]::query::plumbing::try_execute_query::<rustc_query_impl[a46554db2076a7e1]::DynamicConfig<rustc_query_system[9da031a4e4fdb32b]::query::caches::SingleCache<rustc_middle[421a23b7571f26a5]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[a46554db2076a7e1]::plumbing::QueryCtxt, false>
 105:     0x7657bc2b0e12 - rustc_query_impl[a46554db2076a7e1]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
 106:     0x7657bc4a99d6 - rustc_interface[b6aba49ee050940e]::passes::create_and_enter_global_ctxt::<core[df8911376af37c8c]::option::Option<rustc_interface[b6aba49ee050940e]::queries::Linker>, rustc_driver_impl[1d35d6f9d2799e05]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
 107:     0x7657bc49ae2f - rustc_interface[b6aba49ee050940e]::interface::run_compiler::<(), rustc_driver_impl[1d35d6f9d2799e05]::run_compiler::{closure#0}>::{closure#1}
 108:     0x7657bc4460b8 - std[7a7d327c4bb6bc11]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[b6aba49ee050940e]::util::run_in_thread_with_globals<rustc_interface[b6aba49ee050940e]::util::run_in_thread_pool_with_globals<rustc_interface[b6aba49ee050940e]::interface::run_compiler<(), rustc_driver_impl[1d35d6f9d2799e05]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
 109:     0x7657bc445d96 - <<std[7a7d327c4bb6bc11]::thread::Builder>::spawn_unchecked_<rustc_interface[b6aba49ee050940e]::util::run_in_thread_with_globals<rustc_interface[b6aba49ee050940e]::util::run_in_thread_pool_with_globals<rustc_interface[b6aba49ee050940e]::interface::run_compiler<(), rustc_driver_impl[1d35d6f9d2799e05]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[df8911376af37c8c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
 110:     0x7657bc4443bd - std::sys::pal::unix::thread::Thread::new::thread_start::h10083fa6b51603a6
 111:     0x7657b5e9b7eb - <unknown>
 112:     0x7657b5f1f18c - <unknown>
 113:                0x0 - <unknown>

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

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

note: rustc 1.90.0-nightly (fe5f3dedf 2025-06-27) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_built] building MIR for `main`
#1 [check_unsafety] unsafety-checking `main`
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors; 9 warnings emitted

For more information about this error, try `rustc --explain E0658`.

@rustbot label +F-loop_match

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions