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: type parameter out of range when substituting #105709

Closed
matthiaskrgr opened this issue Dec 14, 2022 · 3 comments · Fixed by #112389
Closed

ICE: type parameter out of range when substituting #105709

matthiaskrgr opened this issue Dec 14, 2022 · 3 comments · Fixed by #112389
Assignees
Labels
A-const-generics Area: const generics (parameters and arguments) 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. F-generic_const_exprs `#![feature(generic_const_exprs)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-incomplete-features requires-nightly This issue requires a nightly compiler in some way. 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

Code

#![feature(generic_const_exprs)]
#![feature(inline_const)]
#![allow(incomplete_features)]

pub struct ConstDefaultUnstable<const N: usize = { const {3} }>;

pub fn main() {}

Meta

rustc --version --verbose:

rustc 1.68.0-nightly (0f529f0f4 2022-12-13)
binary: rustc
commit-hash: 0f529f0f49f4dd404b78e605398531c96f220fc5
commit-date: 2022-12-13
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Error output

<output>
Backtrace

error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:827:9: type parameter `<const_ty>/#1` (<const_ty>/1) out of range when substituting, substs=[usize]

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/compiler/rustc_errors/src/lib.rs:1576:9
stack backtrace:
   0:     0x7f5a2660638a - std::backtrace_rs::backtrace::libunwind::trace::h7785c191eb7ee216
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f5a2660638a - std::backtrace_rs::backtrace::trace_unsynchronized::hf351b38b6771dec4
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f5a2660638a - std::sys_common::backtrace::_print_fmt::h713ede78758becef
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f5a2660638a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1878899793c73488
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f5a225c92ee - core::fmt::write::h13bbbc03afcba1c1
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f5a265fa555 - std::io::Write::write_fmt::hfb2ca3e9f8803080
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/io/mod.rs:1682:15
   6:     0x7f5a26606155 - std::sys_common::backtrace::_print::hd117bfadcc3f249e
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f5a26606155 - std::sys_common::backtrace::print::h7e9c04ba80eb0074
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f5a266084df - std::panicking::default_hook::{{closure}}::hb29d3d4cad77f77b
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:267:22
   9:     0x7f5a2660821b - std::panicking::default_hook::hb9cd54f32e45cbdf
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:286:9
  10:     0x7f5a2583c6f1 - rustc_driver[a18c018241618262]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f5a26608cdd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h7096ae9426bf0ef4
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2032:9
  12:     0x7f5a26608cdd - std::panicking::rust_panic_with_hook::heec3062a77321665
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/panicking.rs:692:13
  13:     0x7f5a25cd8de1 - std[e2221f2923982408]::panicking::begin_panic::<rustc_errors[55c94f74a3e69376]::ExplicitBug>::{closure#0}
  14:     0x7f5a25cd8866 - std[e2221f2923982408]::sys_common::backtrace::__rust_end_short_backtrace::<std[e2221f2923982408]::panicking::begin_panic<rustc_errors[55c94f74a3e69376]::ExplicitBug>::{closure#0}, !>
  15:     0x7f5a25d12376 - std[e2221f2923982408]::panicking::begin_panic::<rustc_errors[55c94f74a3e69376]::ExplicitBug>
  16:     0x7f5a25cd8856 - std[e2221f2923982408]::panic::panic_any::<rustc_errors[55c94f74a3e69376]::ExplicitBug>
  17:     0x7f5a25cd4ee6 - <rustc_errors[55c94f74a3e69376]::HandlerInner>::bug::<&alloc[89c3e70836bb9ff9]::string::String>
  18:     0x7f5a25cd4b50 - <rustc_errors[55c94f74a3e69376]::Handler>::bug::<&alloc[89c3e70836bb9ff9]::string::String>
  19:     0x7f5a25cb69be - rustc_middle[fb11b19bba64d848]::ty::context::tls::with_context_opt::<rustc_middle[fb11b19bba64d848]::ty::context::tls::with_opt<rustc_middle[fb11b19bba64d848]::util::bug::opt_span_bug_fmt<rustc_span[22b27358efe64712]::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
  20:     0x7f5a25cb7e26 - rustc_middle[fb11b19bba64d848]::util::bug::opt_span_bug_fmt::<rustc_span[22b27358efe64712]::span_encoding::Span>
  21:     0x7f5a23b49ed3 - rustc_middle[fb11b19bba64d848]::util::bug::bug_fmt
  22:     0x7f5a25d0912e - <rustc_middle[fb11b19bba64d848]::ty::subst::SubstFolder>::type_param_out_of_range
  23:     0x7f5a249815f6 - rustc_traits[e6288d48f676fd87]::type_op::type_op_ascribe_user_type_with_span
  24:     0x7f5a24980290 - <rustc_infer[436d8bad8048b04b]::infer::InferCtxtBuilder as rustc_trait_selection[1e153bf3b090dfe7]::infer::InferCtxtBuilderExt>::enter_canonical_trait_query::<rustc_middle[fb11b19bba64d848]::ty::ParamEnvAnd<rustc_middle[fb11b19bba64d848]::traits::query::type_op::AscribeUserType>, (), rustc_traits[e6288d48f676fd87]::type_op::type_op_ascribe_user_type::{closure#0}>
  25:     0x7f5a2497ff91 - rustc_traits[e6288d48f676fd87]::type_op::type_op_ascribe_user_type
  26:     0x7f5a24bad761 - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::infer::canonical::Canonical<rustc_middle[fb11b19bba64d848]::ty::ParamEnvAnd<rustc_middle[fb11b19bba64d848]::traits::query::type_op::AscribeUserType>>, core[454b920cfc772497]::result::Result<&rustc_middle[fb11b19bba64d848]::infer::canonical::Canonical<rustc_middle[fb11b19bba64d848]::infer::canonical::QueryResponse<()>>, rustc_middle[fb11b19bba64d848]::traits::query::NoSolution>>>
  27:     0x7f5a24bad26e - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::type_op_ascribe_user_type, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  28:     0x7f5a24bad1a3 - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::type_op_ascribe_user_type
  29:     0x7f5a245ef2f3 - <rustc_middle[fb11b19bba64d848]::traits::query::type_op::AscribeUserType as rustc_trait_selection[1e153bf3b090dfe7]::traits::query::type_op::QueryTypeOp>::perform_query
  30:     0x7f5a245ed0af - <rustc_middle[fb11b19bba64d848]::traits::query::type_op::AscribeUserType as rustc_trait_selection[1e153bf3b090dfe7]::traits::query::type_op::QueryTypeOp>::fully_perform_into
  31:     0x7f5a245ea594 - <rustc_middle[fb11b19bba64d848]::ty::ParamEnvAnd<rustc_middle[fb11b19bba64d848]::traits::query::type_op::AscribeUserType> as rustc_trait_selection[1e153bf3b090dfe7]::traits::query::type_op::TypeOp>::fully_perform
  32:     0x7f5a245e9e88 - <rustc_borrowck[321066d147c467a7]::type_check::TypeChecker>::fully_perform_op::<(), rustc_middle[fb11b19bba64d848]::ty::ParamEnvAnd<rustc_middle[fb11b19bba64d848]::traits::query::type_op::AscribeUserType>>
  33:     0x7f5a2463e0ee - <rustc_borrowck[321066d147c467a7]::type_check::TypeVerifier as rustc_middle[fb11b19bba64d848]::mir::visit::Visitor>::visit_operand
  34:     0x7f5a24617b64 - <rustc_borrowck[321066d147c467a7]::type_check::TypeVerifier as rustc_middle[fb11b19bba64d848]::mir::visit::Visitor>::visit_body
  35:     0x7f5a245e5045 - rustc_borrowck[321066d147c467a7]::type_check::type_check
  36:     0x7f5a245bccf5 - rustc_borrowck[321066d147c467a7]::nll::compute_regions
  37:     0x7f5a2459a96b - rustc_borrowck[321066d147c467a7]::do_mir_borrowck
  38:     0x7f5a24596989 - rustc_borrowck[321066d147c467a7]::mir_borrowck
  39:     0x7f5a247dbb5e - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::VecCache<rustc_span[22b27358efe64712]::def_id::LocalDefId, &rustc_middle[fb11b19bba64d848]::mir::query::BorrowCheckResult>>
  40:     0x7f5a251eedaa - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::mir_borrowck
  41:     0x7f5a24294186 - rustc_mir_transform[a30e9448cdbece04]::mir_drops_elaborated_and_const_checked
  42:     0x7f5a2418d9ba - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::ty::WithOptConstParam<rustc_span[22b27358efe64712]::def_id::LocalDefId>, &rustc_data_structures[27389a654890db55]::steal::Steal<rustc_middle[fb11b19bba64d848]::mir::Body>>>
  43:     0x7f5a251ed425 - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::mir_drops_elaborated_and_const_checked
  44:     0x7f5a242fde44 - rustc_mir_transform[a30e9448cdbece04]::inner_mir_for_ctfe
  45:     0x7f5a242fd554 - rustc_mir_transform[a30e9448cdbece04]::mir_for_ctfe
  46:     0x7f5a240c8c5d - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_span[22b27358efe64712]::def_id::DefId, &rustc_middle[fb11b19bba64d848]::mir::Body>>
  47:     0x7f5a251ed568 - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::mir_for_ctfe
  48:     0x7f5a23a481f3 - <rustc_const_eval[d32d9fcb06886bba]::interpret::eval_context::InterpCx<rustc_const_eval[d32d9fcb06886bba]::const_eval::machine::CompileTimeInterpreter>>::load_mir
  49:     0x7f5a23969349 - rustc_const_eval[d32d9fcb06886bba]::const_eval::eval_queries::eval_to_allocation_raw_provider
  50:     0x7f5a24c1376a - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::ty::ParamEnvAnd<rustc_middle[fb11b19bba64d848]::mir::interpret::GlobalId>, core[454b920cfc772497]::result::Result<rustc_middle[fb11b19bba64d848]::mir::interpret::value::ConstAlloc, rustc_middle[fb11b19bba64d848]::mir::interpret::error::ErrorHandled>>>
  51:     0x7f5a251ef06f - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::eval_to_allocation_raw
  52:     0x7f5a24edd077 - rustc_const_eval[d32d9fcb06886bba]::const_eval::eval_to_valtree
  53:     0x7f5a24edced0 - <rustc_const_eval[d32d9fcb06886bba]::provide::{closure#0} as core[454b920cfc772497]::ops::function::FnOnce<(rustc_middle[fb11b19bba64d848]::ty::context::TyCtxt, rustc_middle[fb11b19bba64d848]::ty::ParamEnvAnd<rustc_middle[fb11b19bba64d848]::mir::interpret::GlobalId>)>>::call_once
  54:     0x7f5a24e94d50 - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<rustc_middle[fb11b19bba64d848]::ty::ParamEnvAnd<rustc_middle[fb11b19bba64d848]::mir::interpret::GlobalId>, core[454b920cfc772497]::result::Result<core[454b920cfc772497]::option::Option<rustc_middle[fb11b19bba64d848]::ty::consts::valtree::ValTree>, rustc_middle[fb11b19bba64d848]::mir::interpret::error::ErrorHandled>>>
  55:     0x7f5a24e9488a - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::eval_to_valtree, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  56:     0x7f5a24e947a1 - <rustc_query_impl[f9ce7d291822ba8c]::Queries as rustc_middle[fb11b19bba64d848]::ty::query::QueryEngine>::eval_to_valtree
  57:     0x7f5a2427364e - <rustc_middle[fb11b19bba64d848]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  58:     0x7f5a24272bba - <rustc_middle[fb11b19bba64d848]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  59:     0x7f5a25b56c07 - <rustc_infer[436d8bad8048b04b]::infer::InferCtxt>::const_eval_resolve
  60:     0x7f5a23b85eff - rustc_trait_selection[1e153bf3b090dfe7]::traits::const_evaluatable::is_const_evaluatable
  61:     0x7f5a23b1c29d - <rustc_trait_selection[1e153bf3b090dfe7]::traits::fulfill::FulfillProcessor as rustc_data_structures[27389a654890db55]::obligation_forest::ObligationProcessor>::process_obligation
  62:     0x7f5a23b1242e - <rustc_data_structures[27389a654890db55]::obligation_forest::ObligationForest<rustc_trait_selection[1e153bf3b090dfe7]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[1e153bf3b090dfe7]::traits::fulfill::FulfillProcessor>
  63:     0x7f5a23efc20b - <rustc_trait_selection[1e153bf3b090dfe7]::traits::engine::ObligationCtxt>::select_all_or_error
  64:     0x7f5a2424561f - rustc_hir_analysis[423524a2adbac610]::check::wfcheck::check_type_defn
  65:     0x7f5a24226262 - rustc_hir_analysis[423524a2adbac610]::check::wfcheck::check_well_formed
  66:     0x7f5a23aa4b99 - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::check_well_formed, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  67:     0x7f5a24c66f08 - rustc_data_structures[27389a654890db55]::sync::par_for_each_in::<&[rustc_hir[7de0088f04d77806]::hir::ItemId], <rustc_middle[fb11b19bba64d848]::hir::ModuleItems>::par_items<rustc_hir_analysis[423524a2adbac610]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>
  68:     0x7f5a24c66d17 - rustc_hir_analysis[423524a2adbac610]::check::wfcheck::check_mod_type_wf
  69:     0x7f5a243a7d1d - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::VecCache<rustc_span[22b27358efe64712]::def_id::LocalDefId, ()>>
  70:     0x7f5a24c3b6a3 - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::check_mod_type_wf, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  71:     0x7f5a23dc8b18 - rustc_data_structures[27389a654890db55]::sync::par_for_each_in::<&[rustc_hir[7de0088f04d77806]::hir_id::OwnerId], <rustc_middle[fb11b19bba64d848]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[423524a2adbac610]::check_crate::{closure#5}::{closure#0}::{closure#0}>::{closure#0}>
  72:     0x7f5a23dc8903 - <rustc_session[1886fb585cbb0752]::session::Session>::track_errors::<rustc_hir_analysis[423524a2adbac610]::check_crate::{closure#5}, ()>
  73:     0x7f5a23dc821d - rustc_hir_analysis[423524a2adbac610]::check_crate
  74:     0x7f5a23dc7ebb - rustc_interface[5feaddc0f04e2ee8]::passes::analysis
  75:     0x7f5a25009727 - rustc_query_system[d35528287009336b]::query::plumbing::try_execute_query::<rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt, rustc_query_system[d35528287009336b]::query::caches::DefaultCache<(), core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>>
  76:     0x7f5a25009420 - rustc_query_system[d35528287009336b]::query::plumbing::get_query::<rustc_query_impl[f9ce7d291822ba8c]::queries::analysis, rustc_query_impl[f9ce7d291822ba8c]::plumbing::QueryCtxt>
  77:     0x7f5a24a231f3 - <rustc_interface[5feaddc0f04e2ee8]::passes::QueryContext>::enter::<rustc_driver[a18c018241618262]::run_compiler::{closure#1}::{closure#2}::{closure#2}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  78:     0x7f5a24a1f5a3 - <rustc_interface[5feaddc0f04e2ee8]::interface::Compiler>::enter::<rustc_driver[a18c018241618262]::run_compiler::{closure#1}::{closure#2}, core[454b920cfc772497]::result::Result<core[454b920cfc772497]::option::Option<rustc_interface[5feaddc0f04e2ee8]::queries::Linker>, rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  79:     0x7f5a24a1a608 - rustc_span[22b27358efe64712]::with_source_map::<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  80:     0x7f5a24a1a0f5 - <scoped_tls[a9410c74fe979615]::ScopedKey<rustc_span[22b27358efe64712]::SessionGlobals>>::set::<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  81:     0x7f5a24a196e2 - std[e2221f2923982408]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>
  82:     0x7f5a25100e6e - <<std[e2221f2923982408]::thread::Builder>::spawn_unchecked_<rustc_interface[5feaddc0f04e2ee8]::util::run_in_thread_pool_with_globals<rustc_interface[5feaddc0f04e2ee8]::interface::run_compiler<core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>, rustc_driver[a18c018241618262]::run_compiler::{closure#1}>::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[454b920cfc772497]::result::Result<(), rustc_errors[55c94f74a3e69376]::ErrorGuaranteed>>::{closure#1} as core[454b920cfc772497]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  83:     0x7f5a26610043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd5e0dcf36c8eb2ec
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  84:     0x7f5a26610043 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5249b73c8953b95a
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/alloc/src/boxed.rs:2000:9
  85:     0x7f5a26610043 - std::sys::unix::thread::Thread::new::thread_start::h680046a940e18e85
                               at /rustc/0f529f0f49f4dd404b78e605398531c96f220fc5/library/std/src/sys/unix/thread.rs:108:17
  86:     0x7f5a223068fd - <unknown>
  87:     0x7f5a22388a60 - <unknown>
  88:                0x0 - <unknown>

note: 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.68.0-nightly (0f529f0f4 2022-12-13) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [type_op_ascribe_user_type] evaluating `type_op_ascribe_user_type` `AscribeUserType { mir_ty: usize, def_id: DefId(0:7 ~ 9284102350ff28a36b7761c0cfdcb4a5c0b969a8[f58b]::ConstDefaultUnstable::{constant#0}::{constant#0}), user_substs: UserSubsts { substs: [usize], user_self_ty: None } }`
#1 [mir_borrowck] borrow-checking `ConstDefaultUnstable::{constant#0}`
#2 [mir_drops_elaborated_and_const_checked] elaborating drops for `ConstDefaultUnstable::{constant#0}`
#3 [mir_for_ctfe] caching mir of `ConstDefaultUnstable::{constant#0}` for CTFE
#4 [eval_to_allocation_raw] const-evaluating + checking `ConstDefaultUnstable::{constant#0}`
#5 [eval_to_valtree] evaluating type-level constant
#6 [check_well_formed] checking that `ConstDefaultUnstable` is well-formed
#7 [check_mod_type_wf] checking that types are well-formed in top-level module
#8 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

@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-generic_const_exprs `#![feature(generic_const_exprs)]` requires-nightly This issue requires a nightly compiler in some way. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue labels Dec 14, 2022
@jruderman
Copy link
Contributor

Regression in nightly-2022-03-25

Commits in range
  commit[0] 2022-03-23UTC: Auto merge of #95247 - cuviper:llvm14, r=nikic
  commit[1] 2022-03-23UTC: Auto merge of #95250 - matthiaskrgr:rollup-ma4zl69, r=matthiaskrgr
  commit[2] 2022-03-24UTC: Auto merge of #87667 - the8472:document-in-place-iter, r=yaahc
  commit[3] 2022-03-24UTC: Auto merge of #95233 - compiler-errors:chalk-up, r=jackh726
  commit[4] 2022-03-24UTC: Auto merge of #91030 - estebank:trait-bounds-are-tricky-2, r=oli-obk
  commit[5] 2022-03-24UTC: Auto merge of #94876 - b-naber:thir-abstract-const-changes, r=lcnr
  commit[6] 2022-03-24UTC: Auto merge of #94517 - aDotInTheVoid:inline_wrapping_next_power_two, r=yaahc
  commit[7] 2022-03-24UTC: Auto merge of #94934 - Lireer:const-prop-lint, r=oli-obk
Bisection method

I used:

cargo-bisect-rustc --preserve --start 2020-01-01 --script ./shout.sh

With shout.sh:

! rustc --edition=2021 src/main.rs 2>&1 | grep -E "(internal compiler error)|(panicked)"

On x86_64-apple-darwin

@matthiaskrgr
Copy link
Member Author

So this is not the same root cause as #105631 ..?
Fascinating 😄

@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Dec 22, 2022
@TaKO8Ki TaKO8Ki self-assigned this Jan 18, 2023
@BoxyUwU BoxyUwU added the A-const-generics Area: const generics (parameters and arguments) label Feb 13, 2023
@JohnTitor
Copy link
Member

Triage: Fixed on the latest nightly, @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 Jun 4, 2023
TaKO8Ki added a commit to TaKO8Ki/rust that referenced this issue Jun 8, 2023
replace build with check

Co-authored-by: Michael Goulet <michael@errs.io>

use appropriate test name
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 8, 2023
…llaumeGomez

Rollup of 9 pull requests

Successful merges:

 - rust-lang#112034 (Migrate `item_opaque_ty` to Askama)
 - rust-lang#112179 (Avoid passing --cpu-features when empty)
 - rust-lang#112309 (bootstrap: remove dependency `is-terminal`)
 - rust-lang#112388 (Migrate GUI colors test to original CSS color format)
 - rust-lang#112389 (Add a test for rust-lang#105709)
 - rust-lang#112392 (Fix ICE for while loop with assignment condition with LHS place expr)
 - rust-lang#112394 (Remove accidental comment)
 - rust-lang#112396 (Track more diagnostics in `rustc_expand`)
 - rust-lang#112401 (Don't `use compile_error as print`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors closed this as completed in 5b7eba6 Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) 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. F-generic_const_exprs `#![feature(generic_const_exprs)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-incomplete-features requires-nightly This issue requires a nightly compiler in some way. 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.

8 participants