-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed as duplicate of#121623
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
fn main() {
'outer: {
loop {
continue 'outer;
}
}
}Meta
rustc --version --verbose:
rustc 1.86.0 (05f9846f8 2025-03-31)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: x86_64-unknown-linux-gnu
release: 1.86.0
LLVM version: 19.1.7
Error output
Checking crash v0.1.0 (/home/beto/projects/crash)
error[E0696]: `continue` pointing to a labeled block
--> src/main.rs:4:13
|
2 | / 'outer: {
3 | | loop {
4 | | continue 'outer;
| | ^^^^^^^^^^^^^^^ labeled blocks cannot be `continue`'d
5 | | }
6 | | }
| |_____- labeled block the `continue` points to
thread 'rustc' panicked at compiler/rustc_passes/src/liveness/rwu_table.rs:63:9:
assertion failed: b.index() < self.live_nodes
stack backtrace:
0: 0x7976c8bd6e40 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h6d42cc84fc840290
1: 0x7976c942867c - core::fmt::write::h5af61a909e3ec64d
2: 0x7976ca72ca51 - std::io::Write::write_fmt::h5a7b54aa6e4a315d
3: 0x7976c8bd6ca2 - std::sys::backtrace::BacktraceLock::print::h555579e7396c26ac
4: 0x7976c8bd9122 - std::panicking::default_hook::{{closure}}::h9128866118196224
5: 0x7976c8bd8faa - std::panicking::default_hook::h52e9e7314e0255f6
6: 0x7976c7d33449 - std[d9e466a2d75004a2]::panicking::update_hook::<alloc[54bfe2542ace865d]::boxed::Box<rustc_driver_impl[680c351c5444d7cd]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7976c8bd9ca3 - std::panicking::rust_panic_with_hook::h541791bcc774ef34
8: 0x7976c8bd9966 - std::panicking::begin_panic_handler::{{closure}}::h6479a2f0137c7d19
9: 0x7976c8bd7329 - std::sys::backtrace::__rust_end_short_backtrace::ha04e7c0fc61ded91
10: 0x7976c8bd965d - rust_begin_unwind
11: 0x7976c583d920 - core::panicking::panic_fmt::h5764ee7030b7a73d
12: 0x7976c61a688c - core::panicking::panic::had768957450a0f86
13: 0x7976c9af4702 - <rustc_passes[583c347407443381]::liveness::Liveness>::propagate_through_expr
14: 0x7976c9af187f - <rustc_passes[583c347407443381]::liveness::Liveness>::propagate_through_block
15: 0x7976c9af187f - <rustc_passes[583c347407443381]::liveness::Liveness>::propagate_through_block
16: 0x7976c9aeaa8c - rustc_passes[583c347407443381]::liveness::check_liveness
17: 0x7976c9aea15f - rustc_query_impl[abff21d8349146d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[abff21d8349146d]::query_impl::check_liveness::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 0usize]>>
18: 0x7976c98a2a82 - rustc_query_system[9464b8c501ef87f3]::query::plumbing::try_execute_query::<rustc_query_impl[abff21d8349146d]::DynamicConfig<rustc_data_structures[6e992f72641bf6c6]::vec_cache::VecCache<rustc_span[15ded62729b25549]::def_id::LocalDefId, rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[9464b8c501ef87f3]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[abff21d8349146d]::plumbing::QueryCtxt, true>
19: 0x7976c9896d0d - rustc_query_impl[abff21d8349146d]::query_impl::check_liveness::get_query_incr::__rust_end_short_backtrace
20: 0x7976c9e0de7b - rustc_mir_build[b55d8ca8377cfad8]::builder::build_mir
21: 0x7976c940a06c - rustc_mir_transform[65d952cda38dbfd0]::mir_built
22: 0x7976c940a033 - rustc_query_impl[abff21d8349146d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[abff21d8349146d]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 8usize]>>
23: 0x7976c980c37e - rustc_query_system[9464b8c501ef87f3]::query::plumbing::try_execute_query::<rustc_query_impl[abff21d8349146d]::DynamicConfig<rustc_data_structures[6e992f72641bf6c6]::vec_cache::VecCache<rustc_span[15ded62729b25549]::def_id::LocalDefId, rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[9464b8c501ef87f3]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[abff21d8349146d]::plumbing::QueryCtxt, true>
24: 0x7976c9896865 - rustc_query_impl[abff21d8349146d]::query_impl::mir_built::get_query_incr::__rust_end_short_backtrace
25: 0x7976c9e00058 - rustc_mir_build[b55d8ca8377cfad8]::check_unsafety::check_unsafety
26: 0x7976c9dffec7 - rustc_query_impl[abff21d8349146d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[abff21d8349146d]::query_impl::check_unsafety::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 0usize]>>
27: 0x7976c98a2a82 - rustc_query_system[9464b8c501ef87f3]::query::plumbing::try_execute_query::<rustc_query_impl[abff21d8349146d]::DynamicConfig<rustc_data_structures[6e992f72641bf6c6]::vec_cache::VecCache<rustc_span[15ded62729b25549]::def_id::LocalDefId, rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[9464b8c501ef87f3]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[abff21d8349146d]::plumbing::QueryCtxt, true>
28: 0x7976c98a257e - rustc_query_impl[abff21d8349146d]::query_impl::check_unsafety::get_query_incr::__rust_end_short_backtrace
29: 0x7976c9802e2a - rustc_interface[84ab11ffe8dacd23]::passes::run_required_analyses
30: 0x7976c9f18f1e - rustc_interface[84ab11ffe8dacd23]::passes::analysis
31: 0x7976c9f18eef - rustc_query_impl[abff21d8349146d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[abff21d8349146d]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 0usize]>>
32: 0x7976ca44ef93 - rustc_query_system[9464b8c501ef87f3]::query::plumbing::try_execute_query::<rustc_query_impl[abff21d8349146d]::DynamicConfig<rustc_query_system[9464b8c501ef87f3]::query::caches::SingleCache<rustc_middle[a78c8f6c75429410]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[abff21d8349146d]::plumbing::QueryCtxt, true>
33: 0x7976ca44e915 - rustc_query_impl[abff21d8349146d]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
34: 0x7976ca39aea9 - rustc_interface[84ab11ffe8dacd23]::passes::create_and_enter_global_ctxt::<core[46aa9df3d3dcdeb1]::option::Option<rustc_interface[84ab11ffe8dacd23]::queries::Linker>, rustc_driver_impl[680c351c5444d7cd]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
35: 0x7976ca3ab726 - rustc_interface[84ab11ffe8dacd23]::interface::run_compiler::<(), rustc_driver_impl[680c351c5444d7cd]::run_compiler::{closure#0}>::{closure#1}
36: 0x7976ca2e0744 - std[d9e466a2d75004a2]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[84ab11ffe8dacd23]::util::run_in_thread_with_globals<rustc_interface[84ab11ffe8dacd23]::util::run_in_thread_pool_with_globals<rustc_interface[84ab11ffe8dacd23]::interface::run_compiler<(), rustc_driver_impl[680c351c5444d7cd]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
37: 0x7976ca2e0419 - <<std[d9e466a2d75004a2]::thread::Builder>::spawn_unchecked_<rustc_interface[84ab11ffe8dacd23]::util::run_in_thread_with_globals<rustc_interface[84ab11ffe8dacd23]::util::run_in_thread_pool_with_globals<rustc_interface[84ab11ffe8dacd23]::interface::run_compiler<(), rustc_driver_impl[680c351c5444d7cd]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[46aa9df3d3dcdeb1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
38: 0x7976ca2dfbaf - std::sys::pal::unix::thread::Thread::new::thread_start::hcc5ed016d554f327
39: 0x7976c44a57eb - <unknown>
40: 0x7976c452918c - <unknown>
41: 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: rustc 1.86.0 (05f9846f8 2025-03-31) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type bin -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 [check_liveness] checking liveness of variables in `main`
#1 [mir_built] building MIR for `main`
... and 2 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
For more information about this error, try `rustc --explain E0696`.
error: could not compile `crash` (bin "crash") due to 1 previous error
Backtrace
Checking euclid-vs-elementary v0.1.0 (/home/beto/projects/euclid-vs-elementary)
error[E0696]: `continue` pointing to a labeled block
--> src/bin/elementary.rs:29:30
|
22 | / 'outer: {
23 | | for (b_fac, b_count) in &mut b_factors {
24 | | use std::cmp::Ordering as Ord;
... |
29 | | Ord::Less => continue 'outer
| | ^^^^^^^^^^^^^^^ labeled blocks cannot be `continue`'d
... |
33 | | }
| |_________- labeled block the `continue` points to
thread 'rustc' panicked at compiler/rustc_passes/src/liveness/rwu_table.rs:63:9:
assertion failed: b.index() < self.live_nodes
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: <rustc_passes::liveness::Liveness>::propagate_through_expr
4: <rustc_passes::liveness::Liveness>::propagate_through_block
5: <rustc_passes::liveness::Liveness>::propagate_through_expr
6: <rustc_passes::liveness::Liveness>::propagate_through_block
7: <rustc_passes::liveness::Liveness>::propagate_through_expr
8: <rustc_passes::liveness::Liveness>::propagate_through_expr
9: <rustc_passes::liveness::Liveness>::propagate_through_block
10: <rustc_passes::liveness::Liveness>::propagate_through_block
11: <rustc_passes::liveness::Liveness>::propagate_through_expr
12: <rustc_passes::liveness::Liveness>::propagate_through_block
13: <rustc_passes::liveness::Liveness>::propagate_through_expr
14: <rustc_passes::liveness::Liveness>::propagate_through_expr
15: <rustc_passes::liveness::Liveness>::propagate_through_block
16: rustc_passes::liveness::check_liveness
[... omitted 1 frame ...]
17: rustc_mir_build::builder::build_mir
18: rustc_mir_transform::mir_built
[... omitted 1 frame ...]
19: rustc_mir_build::check_unsafety::check_unsafety
[... omitted 1 frame ...]
20: rustc_interface::passes::run_required_analyses
21: rustc_interface::passes::analysis
[... omitted 1 frame ...]
22: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
23: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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: rustc 1.86.0 (05f9846f8 2025-03-31) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type bin -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 [check_liveness] checking liveness of variables in `mcd`
#1 [mir_built] building MIR for `mcd`
#2 [check_unsafety] unsafety-checking `mcd`
#3 [analysis] running analysis passes on this crate
end of query stack
For more information about this error, try `rustc --explain E0696`.
error: could not compile `euclid-vs-elementary` (bin "elementary") due to 1 previous error
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.