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: expected type for param #112822

Closed
matthiaskrgr opened this issue Jun 20, 2023 · 3 comments · Fixed by #119255
Closed

ICE: expected type for param #112822

matthiaskrgr opened this issue Jun 20, 2023 · 3 comments · Fixed by #119255
Assignees
Labels
C-bug Category: This is a bug. F-const_trait_impl `#![feature(const_trait_impl)]` glacier ICE tracked in rust-lang/glacier. 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(const_trait_impl)]

const fn test() -> impl ~const Fn() {
    const move || {
        let sl: &[u8] = b"foo";

        match sl {
            [first, remainder @ ..] => {
                assert_eq!(first, &b'f');
            }
            [] => panic!(),
        }
    }
}

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (2d0aa5768 2023-06-18)
binary: rustc
commit-hash: 2d0aa57684e10f7b3d3fe740ee18d431181583ad
commit-date: 2023-06-18
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

error[E0658]: const closures are experimental
 --> treereduce.out:4:5
  |
4 |     const move || {
  |     ^^^^^
  |
  = note: see issue #106003 <https://github.com/rust-lang/rust/issues/106003> for more information
  = help: add `#![feature(const_closures)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `treereduce`
  --> treereduce.out:14:2
   |
14 | }
   |  ^ consider adding a `main` function to `treereduce.out`

warning: unused variable: `remainder`
 --> treereduce.out:8:21
  |
8 |             [first, remainder @ ..] => {
  |                     ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_remainder`
  |
  = note: `#[warn(unused_variables)]` on by default
Backtrace

error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:400:45: expected type for param #0 in [ReEarlyBound(0, '_), ReEarlyBound(1, '_), A, B]

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/compiler/rustc_errors/src/lib.rs:1650:9
stack backtrace:
   0:     0x7f6f3b367e11 - std::backtrace_rs::backtrace::libunwind::trace::h184786643c1f8146
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f6f3b367e11 - std::backtrace_rs::backtrace::trace_unsynchronized::h10cef21dd42edd42
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6f3b367e11 - std::sys_common::backtrace::_print_fmt::hca8722c6f82eccd9
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f6f3b367e11 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4b170c65cdf95c48
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f6f3b3c94bf - core::fmt::rt::Argument::fmt::h7e50834cab28e102
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/core/src/fmt/rt.rs:138:9
   5:     0x7f6f3b3c94bf - core::fmt::write::h8bd64fe81f89dd81
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f6f3b35a977 - std::io::Write::write_fmt::hc75a842b3ecac8bc
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/io/mod.rs:1714:15
   7:     0x7f6f3b367c25 - std::sys_common::backtrace::_print::hdb7a31bd8c54eb49
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f6f3b367c25 - std::sys_common::backtrace::print::hbcf968a4222dc0b5
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f6f3b36a9d3 - std::panicking::default_hook::{{closure}}::h02987b13cfa1387d
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/panicking.rs:269:22
  10:     0x7f6f3b36a764 - std::panicking::default_hook::hcb3fd44404995c49
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/panicking.rs:288:9
  11:     0x7f6f3e5abd6b - <rustc_driver_impl[7175fdba515aac6e]::install_ice_hook::{closure#0} as core[baaa20f768102eef]::ops::function::FnOnce<(&core[baaa20f768102eef]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7f6f3b36b1fe - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hec1e31de726d1657
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/alloc/src/boxed.rs:2007:9
  13:     0x7f6f3b36b1fe - std::panicking::rust_panic_with_hook::h223f39091438ac61
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/panicking.rs:709:13
  14:     0x7f6f3eaae8d1 - std[755122e38bdf80bb]::panicking::begin_panic::<rustc_errors[22c53a0383ffa2c9]::ExplicitBug>::{closure#0}
  15:     0x7f6f3eaad526 - std[755122e38bdf80bb]::sys_common::backtrace::__rust_end_short_backtrace::<std[755122e38bdf80bb]::panicking::begin_panic<rustc_errors[22c53a0383ffa2c9]::ExplicitBug>::{closure#0}, !>
  16:     0x7f6f3eb42666 - std[755122e38bdf80bb]::panicking::begin_panic::<rustc_errors[22c53a0383ffa2c9]::ExplicitBug>
  17:     0x7f6f3eaaa2e4 - <rustc_errors[22c53a0383ffa2c9]::HandlerInner>::bug::<alloc[d1ea88cdd25af2a4]::string::String>
  18:     0x7f6f3eaaa166 - <rustc_errors[22c53a0383ffa2c9]::Handler>::bug::<alloc[d1ea88cdd25af2a4]::string::String>
  19:     0x7f6f3eafd5fc - rustc_middle[56c503886228b671]::util::bug::opt_span_bug_fmt::<rustc_span[1e0547ff349d1bca]::span_encoding::Span>::{closure#0}
  20:     0x7f6f3eafa49a - rustc_middle[56c503886228b671]::ty::context::tls::with_opt::<rustc_middle[56c503886228b671]::util::bug::opt_span_bug_fmt<rustc_span[1e0547ff349d1bca]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f6f3eafa46a - rustc_middle[56c503886228b671]::ty::context::tls::with_context_opt::<rustc_middle[56c503886228b671]::ty::context::tls::with_opt<rustc_middle[56c503886228b671]::util::bug::opt_span_bug_fmt<rustc_span[1e0547ff349d1bca]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f6f3c8ef2bd - rustc_middle[56c503886228b671]::util::bug::bug_fmt
  23:     0x7f6f3eae0a41 - rustc_middle[56c503886228b671]::util::call_kind::call_kind
  24:     0x7f6f3e505ee3 - <rustc_const_eval[312f54f1179d9c1]::transform::check_consts::ops::FnCallNonConst as rustc_const_eval[312f54f1179d9c1]::transform::check_consts::ops::NonConstOp>::build_error
  25:     0x7f6f3e549982 - <rustc_const_eval[312f54f1179d9c1]::transform::check_consts::check::Checker>::check_op_spanned::<rustc_const_eval[312f54f1179d9c1]::transform::check_consts::ops::FnCallNonConst>
  26:     0x7f6f3d7fb233 - <rustc_const_eval[312f54f1179d9c1]::transform::check_consts::check::Checker as rustc_middle[56c503886228b671]::mir::visit::Visitor>::visit_terminator
  27:     0x7f6f3d7f692b - <rustc_const_eval[312f54f1179d9c1]::transform::check_consts::check::Checker as rustc_middle[56c503886228b671]::mir::visit::Visitor>::visit_basic_block_data
  28:     0x7f6f3d7f5435 - <rustc_const_eval[312f54f1179d9c1]::transform::check_consts::check::Checker>::check_body
  29:     0x7f6f3c7f145f - rustc_query_impl[e44c98b80a645267]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e44c98b80a645267]::query_impl::mir_const_qualif::dynamic_query::{closure#2}::{closure#0}, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 5usize]>>
  30:     0x7f6f3d55075f - rustc_query_system[ba457099f14053e9]::query::plumbing::try_execute_query::<rustc_query_impl[e44c98b80a645267]::DynamicConfig<rustc_query_system[ba457099f14053e9]::query::caches::DefaultCache<rustc_span[1e0547ff349d1bca]::def_id::DefId, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 5usize]>>, false, false, false>, rustc_query_impl[e44c98b80a645267]::plumbing::QueryCtxt, false>
  31:     0x7f6f3d550488 - rustc_query_impl[e44c98b80a645267]::query_impl::mir_const_qualif::get_query_non_incr::__rust_end_short_backtrace
  32:     0x7f6f3c92f979 - rustc_mir_transform[eaefbefc809602b3]::mir_promoted
  33:     0x7f6f3c605921 - rustc_query_impl[e44c98b80a645267]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e44c98b80a645267]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 16usize]>>
  34:     0x7f6f3ce71efa - rustc_query_system[ba457099f14053e9]::query::plumbing::try_execute_query::<rustc_query_impl[e44c98b80a645267]::DynamicConfig<rustc_query_system[ba457099f14053e9]::query::caches::VecCache<rustc_span[1e0547ff349d1bca]::def_id::LocalDefId, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[e44c98b80a645267]::plumbing::QueryCtxt, false>
  35:     0x7f6f3df173f5 - rustc_query_impl[e44c98b80a645267]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  36:     0x7f6f3d41c37c - rustc_borrowck[cf2d7fd60d38cc0f]::mir_borrowck
  37:     0x7f6f3c6125ee - rustc_query_impl[e44c98b80a645267]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e44c98b80a645267]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 8usize]>>
  38:     0x7f6f3c6125be - <rustc_query_impl[e44c98b80a645267]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[baaa20f768102eef]::ops::function::FnOnce<(rustc_middle[56c503886228b671]::ty::context::TyCtxt, rustc_span[1e0547ff349d1bca]::def_id::LocalDefId)>>::call_once
  39:     0x7f6f3c6d14cd - rustc_query_system[ba457099f14053e9]::query::plumbing::try_execute_query::<rustc_query_impl[e44c98b80a645267]::DynamicConfig<rustc_query_system[ba457099f14053e9]::query::caches::VecCache<rustc_span[1e0547ff349d1bca]::def_id::LocalDefId, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[e44c98b80a645267]::plumbing::QueryCtxt, false>
  40:     0x7f6f3df197ff - rustc_query_impl[e44c98b80a645267]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7f6f3d7c71bf - <rustc_borrowck[cf2d7fd60d38cc0f]::type_check::TypeChecker>::prove_closure_bounds
  42:     0x7f6f3d7973cf - <rustc_borrowck[cf2d7fd60d38cc0f]::type_check::TypeChecker>::typeck_mir
  43:     0x7f6f3d44ed78 - rustc_borrowck[cf2d7fd60d38cc0f]::type_check::type_check
  44:     0x7f6f3d4345d2 - rustc_borrowck[cf2d7fd60d38cc0f]::nll::compute_regions
  45:     0x7f6f3d41e489 - rustc_borrowck[cf2d7fd60d38cc0f]::do_mir_borrowck
  46:     0x7f6f3d41c780 - rustc_borrowck[cf2d7fd60d38cc0f]::mir_borrowck
  47:     0x7f6f3c6125ee - rustc_query_impl[e44c98b80a645267]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e44c98b80a645267]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 8usize]>>
  48:     0x7f6f3c6125be - <rustc_query_impl[e44c98b80a645267]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[baaa20f768102eef]::ops::function::FnOnce<(rustc_middle[56c503886228b671]::ty::context::TyCtxt, rustc_span[1e0547ff349d1bca]::def_id::LocalDefId)>>::call_once
  49:     0x7f6f3c6d14cd - rustc_query_system[ba457099f14053e9]::query::plumbing::try_execute_query::<rustc_query_impl[e44c98b80a645267]::DynamicConfig<rustc_query_system[ba457099f14053e9]::query::caches::VecCache<rustc_span[1e0547ff349d1bca]::def_id::LocalDefId, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[e44c98b80a645267]::plumbing::QueryCtxt, false>
  50:     0x7f6f3df197ff - rustc_query_impl[e44c98b80a645267]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  51:     0x7f6f3d753ee5 - rustc_hir_analysis[eb0d24a920376e7]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  52:     0x7f6f3d750fef - rustc_hir_analysis[eb0d24a920376e7]::collect::type_of::type_of
  53:     0x7f6f3c72635e - rustc_query_impl[e44c98b80a645267]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e44c98b80a645267]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 8usize]>>
  54:     0x7f6f3c726090 - <rustc_query_impl[e44c98b80a645267]::query_impl::type_of::dynamic_query::{closure#2} as core[baaa20f768102eef]::ops::function::FnOnce<(rustc_middle[56c503886228b671]::ty::context::TyCtxt, rustc_span[1e0547ff349d1bca]::def_id::DefId)>>::call_once
  55:     0x7f6f3c60cb35 - rustc_query_system[ba457099f14053e9]::query::plumbing::try_execute_query::<rustc_query_impl[e44c98b80a645267]::DynamicConfig<rustc_query_system[ba457099f14053e9]::query::caches::DefaultCache<rustc_span[1e0547ff349d1bca]::def_id::DefId, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[e44c98b80a645267]::plumbing::QueryCtxt, false>
  56:     0x7f6f3df16421 - rustc_query_impl[e44c98b80a645267]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  57:     0x7f6f3d694e66 - rustc_middle[56c503886228b671]::query::plumbing::query_get_at::<rustc_query_system[ba457099f14053e9]::query::caches::DefaultCache<rustc_span[1e0547ff349d1bca]::def_id::DefId, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 8usize]>>>
  58:     0x7f6f3d68cdcf - rustc_hir_analysis[eb0d24a920376e7]::check::check::check_mod_item_types
  59:     0x7f6f3d21438c - rustc_query_impl[e44c98b80a645267]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e44c98b80a645267]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 0usize]>>
  60:     0x7f6f3d21436e - <rustc_query_impl[e44c98b80a645267]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[baaa20f768102eef]::ops::function::FnOnce<(rustc_middle[56c503886228b671]::ty::context::TyCtxt, rustc_span[1e0547ff349d1bca]::def_id::LocalDefId)>>::call_once
  61:     0x7f6f3cc4397f - rustc_query_system[ba457099f14053e9]::query::plumbing::try_execute_query::<rustc_query_impl[e44c98b80a645267]::DynamicConfig<rustc_query_system[ba457099f14053e9]::query::caches::VecCache<rustc_span[1e0547ff349d1bca]::def_id::LocalDefId, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[e44c98b80a645267]::plumbing::QueryCtxt, false>
  62:     0x7f6f3df21b92 - rustc_query_impl[e44c98b80a645267]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  63:     0x7f6f3d9c1187 - <rustc_middle[56c503886228b671]::hir::map::Map>::for_each_module::<rustc_hir_analysis[eb0d24a920376e7]::check_crate::{closure#6}::{closure#0}>
  64:     0x7f6f3d9c099d - <rustc_session[ebb9057f9195e4cc]::session::Session>::time::<(), rustc_hir_analysis[eb0d24a920376e7]::check_crate::{closure#6}>
  65:     0x7f6f3d9bee67 - rustc_hir_analysis[eb0d24a920376e7]::check_crate
  66:     0x7f6f3d9b280a - rustc_interface[e3841d12b9b221e7]::passes::analysis
  67:     0x7f6f3da2350a - rustc_query_impl[e44c98b80a645267]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e44c98b80a645267]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 1usize]>>
  68:     0x7f6f3da234f9 - <rustc_query_impl[e44c98b80a645267]::query_impl::analysis::dynamic_query::{closure#2} as core[baaa20f768102eef]::ops::function::FnOnce<(rustc_middle[56c503886228b671]::ty::context::TyCtxt, ())>>::call_once
  69:     0x7f6f3dc3f0f8 - rustc_query_system[ba457099f14053e9]::query::plumbing::try_execute_query::<rustc_query_impl[e44c98b80a645267]::DynamicConfig<rustc_query_system[ba457099f14053e9]::query::caches::SingleCache<rustc_middle[56c503886228b671]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[e44c98b80a645267]::plumbing::QueryCtxt, false>
  70:     0x7f6f3dc3eed7 - rustc_query_impl[e44c98b80a645267]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  71:     0x7f6f3dad6115 - <rustc_middle[56c503886228b671]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[7175fdba515aac6e]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[baaa20f768102eef]::result::Result<(), rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>>
  72:     0x7f6f3dad57bc - <rustc_interface[e3841d12b9b221e7]::interface::Compiler>::enter::<rustc_driver_impl[7175fdba515aac6e]::run_compiler::{closure#1}::{closure#2}, core[baaa20f768102eef]::result::Result<core[baaa20f768102eef]::option::Option<rustc_interface[e3841d12b9b221e7]::queries::Linker>, rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>>
  73:     0x7f6f3dad2e21 - std[755122e38bdf80bb]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e3841d12b9b221e7]::util::run_in_thread_pool_with_globals<rustc_interface[e3841d12b9b221e7]::interface::run_compiler<core[baaa20f768102eef]::result::Result<(), rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>, rustc_driver_impl[7175fdba515aac6e]::run_compiler::{closure#1}>::{closure#0}, core[baaa20f768102eef]::result::Result<(), rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[baaa20f768102eef]::result::Result<(), rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>>
  74:     0x7f6f3dad25a5 - <<std[755122e38bdf80bb]::thread::Builder>::spawn_unchecked_<rustc_interface[e3841d12b9b221e7]::util::run_in_thread_pool_with_globals<rustc_interface[e3841d12b9b221e7]::interface::run_compiler<core[baaa20f768102eef]::result::Result<(), rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>, rustc_driver_impl[7175fdba515aac6e]::run_compiler::{closure#1}>::{closure#0}, core[baaa20f768102eef]::result::Result<(), rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[baaa20f768102eef]::result::Result<(), rustc_span[1e0547ff349d1bca]::ErrorGuaranteed>>::{closure#1} as core[baaa20f768102eef]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  75:     0x7f6f3b375685 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h59d6baf462325ed4
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/alloc/src/boxed.rs:1993:9
  76:     0x7f6f3b375685 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4eca0dd82537346f
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/alloc/src/boxed.rs:1993:9
  77:     0x7f6f3b375685 - std::sys::unix::thread::Thread::new::thread_start::h38e13b8ca4256fdb
                               at /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/library/std/src/sys/unix/thread.rs:108:17
  78:     0x7f6f3b0d444b - <unknown>
  79:     0x7f6f3b157e40 - <unknown>
  80:                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: rustc 1.72.0-nightly (2d0aa5768 2023-06-18) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_const_qualif] const checking `test::{closure#0}`
#1 [mir_promoted] promoting constants in MIR for `test::{closure#0}`
#2 [mir_borrowck] borrow-checking `test::{closure#0}`
#3 [mir_borrowck] borrow-checking `test`
#4 [type_of] computing type of `test::{opaque#0}`
#5 [check_mod_item_types] checking item types in top-level module
#6 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors; 1 warning emitted

@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. F-const_trait_impl `#![feature(const_trait_impl)]` labels Jun 20, 2023
@matthiaskrgr
Copy link
Member Author

Regression in nightly-2023-02-05
Regression in 886b2c3
#107551 cc @fee1-dead

@JohnTitor
Copy link
Member

Fixed on the latest nightly, marking as E-needs-test
@rustbot labels: +E-needs-test

@rustbot rustbot added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 15, 2023
@fee1-dead
Copy link
Member

fee1-dead commented Oct 15, 2023

I don't think this is actually fixed, just that the ICE cannot be triggered currently, but might resurface when the effects feature is fully implemented.

@fee1-dead fee1-dead removed the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 15, 2023
@fee1-dead fee1-dead self-assigned this Oct 15, 2023
fee1-dead added a commit to fee1-dead-contrib/rust that referenced this issue Dec 23, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 23, 2023
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 23, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#112936 (Add illumos aarch64 target for rust.)
 - rust-lang#119153 (stabilize `file_create_new`)
 - rust-lang#119246 ([rustdoc] Add `is_object_safe` information for traits in JSON output)
 - rust-lang#119254 (Remove an unused diagnostic struct)
 - rust-lang#119255 (add a test for ICE rust-lang#112822)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Dec 23, 2023
Rollup merge of rust-lang#119255 - fee1-dead-contrib:fix-ice, r=compiler-errors

add a test for ICE rust-lang#112822

closes rust-lang#112822.
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_trait_impl `#![feature(const_trait_impl)]` glacier ICE tracked in rust-lang/glacier. 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.

5 participants