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: mir_const_qualif: index out of bounds: the len is 0 but the index is 0 #125837

Closed
matthiaskrgr opened this issue Jun 1, 2024 · 1 comment · Fixed by #128035
Closed

ICE: mir_const_qualif: index out of bounds: the len is 0 but the index is 0 #125837

matthiaskrgr opened this issue Jun 1, 2024 · 1 comment · Fixed by #128035
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Similar to #125670 but different query stack

auto-reduced (treereduce-rust):

use std::fmt::Debug;

trait Foo<Item> {}

impl<Item, D: Debug + Clone> Foo for D {
    fn foo<'a>(&'a self) -> impl Debug {
        const { return }
    }
}

original:

#![doc(hidden)]

use std::fmt::Debug;


trait Foo<Item> {
    fn foo<'a>(&'a self) -> impl Debug where : 'a;
}

impl<Item, D: Debug + Clone> Foo<Output = usize> for D {
    fn foo<'a>(&'a self) -> impl Debug where Item: 'a {
    const { return }
}
}

Version information

rustc 1.80.0-nightly (20be84a7e 2024-05-31)
binary: rustc
commit-hash: 20be84a7e62af0a623af4bfb75df6d30cb39d6d0
commit-date: 2024-05-31
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6

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

Program output

error[E0407]: method `foo` is not a member of trait `Foo`
 --> /tmp/icemaker_global_tempdir.OWIz7v1dKA5i/rustc_testrunner_tmpdir_reporting.6kAZMMVsFDVN/mvce.rs:6:5
  |
6 | /     fn foo<'a>(&'a self) -> impl Debug {
7 | |         const { return }
8 | |     }
  | |_____^ not a member of trait `Foo`

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

error[E0107]: missing generics for trait `Foo`
 --> /tmp/icemaker_global_tempdir.OWIz7v1dKA5i/rustc_testrunner_tmpdir_reporting.6kAZMMVsFDVN/mvce.rs:5:30
  |
5 | impl<Item, D: Debug + Clone> Foo for D {
  |                              ^^^ expected 1 generic argument
  |
note: trait defined here, with 1 generic parameter: `Item`
 --> /tmp/icemaker_global_tempdir.OWIz7v1dKA5i/rustc_testrunner_tmpdir_reporting.6kAZMMVsFDVN/mvce.rs:3:7
  |
3 | trait Foo<Item> {}
  |       ^^^ ----
help: add missing generic argument
  |
5 | impl<Item, D: Debug + Clone> Foo<Item> for D {
  |                                 ++++++

error[E0207]: the type parameter `Item` is not constrained by the impl trait, self type, or predicates
 --> /tmp/icemaker_global_tempdir.OWIz7v1dKA5i/rustc_testrunner_tmpdir_reporting.6kAZMMVsFDVN/mvce.rs:5:6
  |
5 | impl<Item, D: Debug + Clone> Foo for D {
  |      ^^^^ unconstrained type parameter

warning: unreachable expression
 --> /tmp/icemaker_global_tempdir.OWIz7v1dKA5i/rustc_testrunner_tmpdir_reporting.6kAZMMVsFDVN/mvce.rs:7:9
  |
7 |         const { return }
  |         ^^^^^^^^------^^
  |         |       |
  |         |       any code following this expression is unreachable
  |         unreachable expression
  |
  = note: `#[warn(unreachable_code)]` on by default

thread 'rustc' panicked at compiler/rustc_mir_build/src/build/scope.rs:639:58:
index out of bounds: the len is 0 but the index is 0
stack backtrace:
   0:     0x7d79093bdcc5 - std::backtrace_rs::backtrace::libunwind::trace::h9f3d70c9733d841d
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7d79093bdcc5 - std::backtrace_rs::backtrace::trace_unsynchronized::h18a7c2b106fba01e
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7d79093bdcc5 - std::sys_common::backtrace::_print_fmt::h51b9aab95f9337b6
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7d79093bdcc5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5962f96b03d62e09
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7d790940e6bb - core::fmt::rt::Argument::fmt::hf535dbee9d8bf491
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/core/src/fmt/rt.rs:165:63
   5:     0x7d790940e6bb - core::fmt::write::h715ab647ff75b718
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/core/src/fmt/mod.rs:1168:21
   6:     0x7d79093b2a4f - std::io::Write::write_fmt::h51a61126f28423f0
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/io/mod.rs:1835:15
   7:     0x7d79093bda9e - std::sys_common::backtrace::_print::hb5bb864cf394908c
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7d79093bda9e - std::sys_common::backtrace::print::h9808ce89dcfc167b
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7d79093c04d9 - std::panicking::default_hook::{{closure}}::h8d21bb511b5c1e78
  10:     0x7d79093c027a - std::panicking::default_hook::h4b2c758dea5df587
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/panicking.rs:298:9
  11:     0x7d7905b2ee6f - std[b00b182216382e6e]::panicking::update_hook::<alloc[7ffab2895a2c57d5]::boxed::Box<rustc_driver_impl[76688ae60f501fda]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7d79093c0c0b - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h8924c01e9ca42ec1
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/alloc/src/boxed.rs:2077:9
  13:     0x7d79093c0c0b - std::panicking::rust_panic_with_hook::h0e8c82a619b41cae
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/panicking.rs:799:13
  14:     0x7d79093c0984 - std::panicking::begin_panic_handler::{{closure}}::hbc0bba6f9eca058c
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/panicking.rs:664:13
  15:     0x7d79093be189 - std::sys_common::backtrace::__rust_end_short_backtrace::h33e7fda0e36c4611
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7d79093c06b7 - rust_begin_unwind
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/panicking.rs:652:5
  17:     0x7d790940ac53 - core::panicking::panic_fmt::h24b5889f54c352c3
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/core/src/panicking.rs:72:14
  18:     0x7d790940ae67 - core::panicking::panic_bounds_check::hd3c2a50671bc06f3
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/core/src/panicking.rs:274:5
  19:     0x7d7907288bf5 - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::break_scope
  20:     0x7d7907298bd2 - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::stmt_expr
  21:     0x7d79072ace2b - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::expr_into_dest
  22:     0x7d79072a2b2a - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::as_temp::{closure#0}
  23:     0x7d79072ac06f - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::expr_into_dest
  24:     0x7d79072ac2ef - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::expr_into_dest
  25:     0x7d7907b42e76 - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::ast_block_stmts
  26:     0x7d7907b41da3 - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::ast_block
  27:     0x7d79072aaeae - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::expr_into_dest
  28:     0x7d79072ac2ef - <rustc_mir_build[c2b4dc83b1c9e2e3]::build::Builder>::expr_into_dest
  29:     0x7d79072833db - rustc_mir_build[c2b4dc83b1c9e2e3]::build::mir_build
  30:     0x7d790727faac - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>
  31:     0x7d7907630d2e - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::VecCache<rustc_span[56a58ca3bbf1d657]::def_id::LocalDefId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  32:     0x7d790763084d - rustc_query_impl[7198874a8352ad7b]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  33:     0x7d7907746ea7 - rustc_mir_transform[65f24172d555ead6]::mir_const_qualif
  34:     0x7d7907746daf - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::mir_const_qualif::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 4usize]>>
  35:     0x7d790774630b - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::DefIdCache<rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 4usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  36:     0x7d79077460a3 - rustc_query_impl[7198874a8352ad7b]::query_impl::mir_const_qualif::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7d790490778f - rustc_mir_transform[65f24172d555ead6]::mir_promoted
  38:     0x7d790724dbd2 - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 16usize]>>
  39:     0x7d790724de7d - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::VecCache<rustc_span[56a58ca3bbf1d657]::def_id::LocalDefId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  40:     0x7d7907f0b1de - rustc_query_impl[7198874a8352ad7b]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7d7907f0b2d1 - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>
  42:     0x7d7907630d2e - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::VecCache<rustc_span[56a58ca3bbf1d657]::def_id::LocalDefId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  43:     0x7d790763078d - rustc_query_impl[7198874a8352ad7b]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  44:     0x7d79072f31c4 - rustc_middle[e126b53f3333d426]::query::plumbing::query_get_at::<rustc_query_system[2bc1932167c59c8e]::query::caches::VecCache<rustc_span[56a58ca3bbf1d657]::def_id::LocalDefId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>>
  45:     0x7d79072f3222 - <rustc_borrowck[d58b4e82c9225ce2]::type_check::TypeChecker>::prove_closure_bounds
  46:     0x7d790732f5c7 - <rustc_borrowck[d58b4e82c9225ce2]::type_check::TypeChecker>::typeck_mir
  47:     0x7d79046a4bc1 - rustc_borrowck[d58b4e82c9225ce2]::type_check::type_check
  48:     0x7d7904654b22 - rustc_borrowck[d58b4e82c9225ce2]::nll::compute_regions
  49:     0x7d7907f18da5 - rustc_borrowck[d58b4e82c9225ce2]::do_mir_borrowck
  50:     0x7d7907f0b388 - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>
  51:     0x7d7907630d2e - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::VecCache<rustc_span[56a58ca3bbf1d657]::def_id::LocalDefId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  52:     0x7d790763078d - rustc_query_impl[7198874a8352ad7b]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  53:     0x7d790772747f - rustc_middle[e126b53f3333d426]::query::plumbing::query_get_at::<rustc_query_system[2bc1932167c59c8e]::query::caches::VecCache<rustc_span[56a58ca3bbf1d657]::def_id::LocalDefId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>>
  54:     0x7d7907e1d48a - rustc_hir_analysis[3427582cd7078f06]::collect::type_of::type_of_opaque
  55:     0x7d7907e1d2e7 - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>
  56:     0x7d79071af1a7 - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::DefIdCache<rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  57:     0x7d7908029476 - rustc_query_impl[7198874a8352ad7b]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  58:     0x7d7907725c39 - rustc_middle[e126b53f3333d426]::query::plumbing::query_get_at::<rustc_query_system[2bc1932167c59c8e]::query::caches::DefIdCache<rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>>
  59:     0x7d7904c0947d - rustc_hir_analysis[3427582cd7078f06]::collect::type_of::type_of
  60:     0x7d79071b05aa - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>
  61:     0x7d79071af1a7 - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::DefIdCache<rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  62:     0x7d79071aed67 - rustc_query_impl[7198874a8352ad7b]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  63:     0x7d7907725c39 - rustc_middle[e126b53f3333d426]::query::plumbing::query_get_at::<rustc_query_system[2bc1932167c59c8e]::query::caches::DefIdCache<rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 8usize]>>>
  64:     0x7d7907bb2a98 - rustc_hir_analysis[3427582cd7078f06]::check::check::check_item_type
  65:     0x7d7907b9c2a9 - rustc_hir_analysis[3427582cd7078f06]::check::wfcheck::check_well_formed
  66:     0x7d7907b9ab47 - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 1usize]>>
  67:     0x7d7907b9a2e6 - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::VecCache<rustc_hir[ee96af3dfdcd5f01]::hir_id::OwnerId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  68:     0x7d7907b9a064 - rustc_query_impl[7198874a8352ad7b]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  69:     0x7d7907b97f37 - rustc_hir_analysis[3427582cd7078f06]::check::wfcheck::check_mod_type_wf
  70:     0x7d7907b97d61 - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 1usize]>>
  71:     0x7d7907a89f30 - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::DefaultCache<rustc_span[56a58ca3bbf1d657]::def_id::LocalModDefId, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  72:     0x7d7907a89cd9 - rustc_query_impl[7198874a8352ad7b]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  73:     0x7d790762d94c - rustc_hir_analysis[3427582cd7078f06]::check_crate
  74:     0x7d7907646d3e - rustc_interface[36e11d5fade2f9e3]::passes::analysis
  75:     0x7d790764689b - rustc_query_impl[7198874a8352ad7b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7198874a8352ad7b]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 1usize]>>
  76:     0x7d7907dd43a5 - rustc_query_system[2bc1932167c59c8e]::query::plumbing::try_execute_query::<rustc_query_impl[7198874a8352ad7b]::DynamicConfig<rustc_query_system[2bc1932167c59c8e]::query::caches::SingleCache<rustc_middle[e126b53f3333d426]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[7198874a8352ad7b]::plumbing::QueryCtxt, false>
  77:     0x7d7907dd410f - rustc_query_impl[7198874a8352ad7b]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  78:     0x7d7907c44edc - rustc_interface[36e11d5fade2f9e3]::interface::run_compiler::<core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>, rustc_driver_impl[76688ae60f501fda]::run_compiler::{closure#0}>::{closure#1}
  79:     0x7d7907c302c9 - std[b00b182216382e6e]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[36e11d5fade2f9e3]::util::run_in_thread_with_globals<rustc_interface[36e11d5fade2f9e3]::util::run_in_thread_pool_with_globals<rustc_interface[36e11d5fade2f9e3]::interface::run_compiler<core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>, rustc_driver_impl[76688ae60f501fda]::run_compiler::{closure#0}>::{closure#1}, core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>>::{closure#0}, core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>>
  80:     0x7d7907c30080 - <<std[b00b182216382e6e]::thread::Builder>::spawn_unchecked_<rustc_interface[36e11d5fade2f9e3]::util::run_in_thread_with_globals<rustc_interface[36e11d5fade2f9e3]::util::run_in_thread_pool_with_globals<rustc_interface[36e11d5fade2f9e3]::interface::run_compiler<core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>, rustc_driver_impl[76688ae60f501fda]::run_compiler::{closure#0}>::{closure#1}, core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>>::{closure#0}, core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9b5a30cfc7641096]::result::Result<(), rustc_span[56a58ca3bbf1d657]::ErrorGuaranteed>>::{closure#2} as core[9b5a30cfc7641096]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  81:     0x7d79093cabfb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hcf19ff9fb573dd5c
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/alloc/src/boxed.rs:2063:9
  82:     0x7d79093cabfb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h911d5926b91dbfb2
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/alloc/src/boxed.rs:2063:9
  83:     0x7d79093cabfb - std::sys::pal::unix::thread::Thread::new::thread_start::h763866eb5216580e
                               at /rustc/20be84a7e62af0a623af4bfb75df6d30cb39d6d0/library/std/src/sys/pal/unix/thread.rs:108:17
  84:     0x7d79028aa1cf - <unknown>
  85:     0x7d790292b6ec - <unknown>
  86:                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: rustc 1.80.0-nightly (20be84a7e 2024-05-31) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_built] building MIR for `<impl at /tmp/icemaker_global_tempdir.OWIz7v1dKA5i/rustc_testrunner_tmpdir_reporting.6kAZMMVsFDVN/mvce.rs:5:1: 5:39>::foo::{constant#0}`
#1 [mir_const_qualif] const checking `<impl at /tmp/icemaker_global_tempdir.OWIz7v1dKA5i/rustc_testrunner_tmpdir_reporting.6kAZMMVsFDVN/mvce.rs:5:1: 5:39>::foo::{constant#0}`
end of query stack
error: aborting due to 4 previous errors; 1 warning emitted

Some errors have detailed explanations: E0107, E0207, E0407, E0601.
For more information about an error, try `rustc --explain E0107`.

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jun 1, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 1, 2024
@jieyouxu jieyouxu added A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 4, 2024
@matthiaskrgr matthiaskrgr added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Jun 8, 2024
@GrigorenkoPV
Copy link
Contributor

ICE introduced in #124650.
No longer ICEs after #125918, which was a partial revert of #124650

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 22, 2024
Rollup of 8 pull requests

Successful merges:

 - rust-lang#127177 (Distribute rustc_codegen_cranelift for arm64 macOS)
 - rust-lang#127415 (Add missing try_new_uninit_slice_in and try_new_zeroed_slice_in)
 - rust-lang#127510 (Rewrite `test-float-parse` in Rust)
 - rust-lang#127977 (Update wasi-sdk in CI to latest release)
 - rust-lang#127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake)
 - rust-lang#127996 (Clean up warnings + `unsafe_op_in_unsafe_fn` when building std for armv6k-nintendo-3ds)
 - rust-lang#128035 (Add test for rust-lang#125837)
 - rust-lang#128054 (mw triagebot vacation)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors closed this as completed in f4d6d99 Jul 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 22, 2024
Rollup merge of rust-lang#128035 - tiif:issue-125837, r=lcnr

Add test for rust-lang#125837

Fixes rust-lang#125837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue 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