Skip to content

ICE array-size-in-generic-struct-param.rs: const parameter CFG/#0 (Const { ty: Config, val: Param(CFG/#0) }/0) out of range when substituting substs=[] #75506

Closed

Description

@matthiaskrgr

Code

code from ./src/test/ui/const-generics/array-size-in-generic-struct-param.rs

// Tests that array sizes that depend on const-params are checked using `ConstEvaluatable`.
// revisions: full min

#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]

#[allow(dead_code)]
struct ArithArrayLen<const N: usize>([u32; 0 + N]);

#[derive(PartialEq, Eq)]
struct Config {
    arr_size: usize,
}

struct B<const CFG: Config> {
    arr: [u8; CFG.arr_size],
}

const C: Config = Config { arr_size: 5 };

fn main() {
    let b = B::<C> { arr: [1, 2, 3, 4, 5] };
    assert_eq!(b.arr.len(), 5);
}

Meta

repo @ 5e3f1b1

Error output

error[E0658]: const generics are unstable
 --> ./src/test/ui/const-generics/array-size-in-generic-struct-param.rs:9:28
  |
9 | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
  |                            ^
  |
  = note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
  = help: add `#![feature(min_const_generics)]` to the crate attributes to enable

error[E0658]: const generics are unstable
  --> ./src/test/ui/const-generics/array-size-in-generic-struct-param.rs:16:16
   |
16 | struct B<const CFG: Config> {
   |                ^^^
   |
   = note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
   = help: add `#![feature(min_const_generics)]` to the crate attributes to enable

error: internal compiler error: src/librustc_middle/ty/subst.rs:569:17: const parameter `N/#0` (Const { ty: usize, val: Param(N/#0) }/0) out of range when substituting substs=[]

thread 'rustc' panicked at 'Box<Any>', /home/matthias/vcs/github/rust/library/std/src/macros.rs:13:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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.47.0-dev running on x86_64-unknown-linux-gnu

error: internal compiler error: src/librustc_middle/ty/subst.rs:569:17: const parameter `CFG/#0` (Const { ty: Config, val: Param(CFG/#0) }/0) out of range when substituting substs=[]

thread 'rustc' panicked at 'Box<Any>', /home/matthias/vcs/github/rust/library/std/src/macros.rs:13:23

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.47.0-dev running on x86_64-unknown-linux-gnu

error: aborting due to 4 previous errors

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

error[E0658]: const generics are unstable
 --> ./src/test/ui/const-generics/array-size-in-generic-struct-param.rs:9:28
  |
9 | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
  |                            ^
  |
  = note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
  = help: add `#![feature(min_const_generics)]` to the crate attributes to enable

error[E0658]: const generics are unstable
  --> ./src/test/ui/const-generics/array-size-in-generic-struct-param.rs:16:16
   |
16 | struct B<const CFG: Config> {
   |                ^^^
   |
   = note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
   = help: add `#![feature(min_const_generics)]` to the crate attributes to enable

error: internal compiler error: src/librustc_middle/ty/subst.rs:569:17: const parameter `N/#0` (Const { ty: usize, val: Param(N/#0) }/0) out of range when substituting substs=[]

thread 'rustc' panicked at 'Box<Any>', /home/matthias/vcs/github/rust/library/std/src/macros.rs:13:23
stack backtrace:
   0:     0x7f62b2fb3d91 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9a65342185cb7022
   1:     0x7f62b30222cd - core::fmt::write::hc3de054a6627b208
   2:     0x7f62b2f93ab3 - std::io::Write::write_fmt::h64bd8d8dca95fd5c
   3:     0x7f62b2f8cb10 - std::panicking::default_hook::{{closure}}::ha9c6947a872dc513
   4:     0x7f62b2f8c74d - std::panicking::default_hook::h3e5e46d076456208
   5:     0x7f62b4071269 - rustc_driver::report_ice::he0572c9ff71e0a8c
   6:     0x7f62b2f8d156 - std::panicking::rust_panic_with_hook::h30c558028146672c
   7:     0x7f62b652656d - std::panicking::begin_panic::{{closure}}::h96c5d8b23c10b36a
   8:     0x7f62b6526356 - std::sys_common::backtrace::__rust_end_short_backtrace::h98f679cf3c561f3c
   9:     0x7f62b633111f - std::panicking::begin_panic::h65c51a53a81437fd
  10:     0x7f62b669cbec - rustc_errors::HandlerInner::span_bug::ha07457fa25949e84
  11:     0x7f62b669d2f0 - rustc_errors::Handler::span_bug::hbb74711f3db8ebf3
  12:     0x7f62b6624018 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::h4a7f07794a96b9b2
  13:     0x7f62b660a703 - rustc_middle::ty::context::tls::with_opt::{{closure}}::h19e60cd4fc7d8059
  14:     0x7f62b660a669 - rustc_middle::ty::context::tls::with_opt::h346f3e655bc513dc
  15:     0x7f62b6623f17 - rustc_middle::util::bug::opt_span_bug_fmt::h35bf29c4eb538873
  16:     0x7f62b6623ed1 - rustc_middle::util::bug::span_bug_fmt::h280140fbfd3b6cca
  17:     0x7f62b65f48a3 - <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::TypeFolder>::fold_const::h7a50de3c95311e03
  18:     0x7f62b5544add - rustc_middle::ty::normalize_erasing_regions::<impl rustc_middle::ty::context::TyCtxt>::subst_and_normalize_erasing_regions::h79e6d568f2bee0ca
  19:     0x7f62b5273fbb - rustc_mir::interpret::operand::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_operand::hccef71beb839ca33
  20:     0x7f62b529ed29 - rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_rvalue_into_place::hbc3e67db53b60802
  21:     0x7f62b5290dad - rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::run::h4e302c3d25a3f08c
  22:     0x7f62b53a592f - rustc_mir::const_eval::eval_queries::const_eval_raw_provider::h105f922d09dd2652
  23:     0x7f62b5317524 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_raw>::compute::h04b2e5889c7d6d53
  24:     0x7f62b5174949 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h3dd8792e6d237967
  25:     0x7f62b532777e - rustc_data_structures::stack::ensure_sufficient_stack::h2228541d95921492
  26:     0x7f62b5575cb3 - rustc_query_system::query::plumbing::get_query_impl::h240b503fbcb2e001
  27:     0x7f62b53a3677 - rustc_mir::const_eval::eval_queries::const_eval_validated_provider::h98bdfd50fd8392b3
  28:     0x7f62b5318274 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_validated>::compute::he4d9d5d8296e782d
  29:     0x7f62b51814a9 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hc6404f0b5657110e
  30:     0x7f62b53264ee - rustc_data_structures::stack::ensure_sufficient_stack::h0172bed68fd28962
  31:     0x7f62b5596e2c - rustc_query_system::query::plumbing::get_query_impl::h6cf806f9a2b220d0
  32:     0x7f62b53a3435 - rustc_mir::const_eval::eval_queries::const_eval_validated_provider::h98bdfd50fd8392b3
  33:     0x7f62b664d988 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_validated>::compute::he4d9d5d8296e782d
  34:     0x7f62b6827323 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h17ccf27999cdbfda
  35:     0x7f62b650de78 - rustc_data_structures::stack::ensure_sufficient_stack::hc7371369bc18827b
  36:     0x7f62b66ae4ec - rustc_query_system::query::plumbing::get_query_impl::h15cc98afa5331b5b
  37:     0x7f62b65ca3bc - rustc_middle::mir::interpret::queries::<impl rustc_middle::ty::context::TyCtxt>::const_eval_global_id::hfa304b68111680d4
  38:     0x7f62b65ca106 - rustc_middle::mir::interpret::queries::<impl rustc_middle::ty::context::TyCtxt>::const_eval_resolve::hb1504079523452e5
  39:     0x7f62b6062576 - <rustc_trait_selection::traits::project::AssocTypeNormalizer as rustc_middle::ty::fold::TypeFolder>::fold_const::h65300d88b63174b3
  40:     0x7f62b5f85dd3 - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::fold::TypeFoldable for &rustc_middle::ty::TyS>::super_fold_with::he97e902ca453e8c0
  41:     0x7f62b6061d6e - <rustc_trait_selection::traits::project::AssocTypeNormalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty::hee19f5e41aedb6b5
  42:     0x7f62b499ca0a - rustc_data_structures::stack::ensure_sufficient_stack::hbe260e288157ed57
  43:     0x7f62b4bf9000 - rustc_trait_selection::traits::project::normalize::h5613c8bfc5d74e91
  44:     0x7f62b4ae185a - rustc_typeck::check::Inherited::normalize_associated_types_in::hca1c0f4febcd9d20
  45:     0x7f62b4c31e72 - <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter::h2e262052cec849ed
  46:     0x7f62b4addcb8 - rustc_typeck::check::InheritedBuilder::enter::h82ba0d79645e3160
  47:     0x7f62b49f5d01 - rustc_typeck::check::wfcheck::check_item_well_formed::hee3ec82e08558fbf
  48:     0x7f62b4947a4e - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::check_item_well_formed>::compute::h2ec5d177707c5676
  49:     0x7f62b496f260 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h9a8f7b2c07d7db3d
  50:     0x7f62b4982a69 - rustc_data_structures::stack::ensure_sufficient_stack::h0d95f890c0ba21cd
  51:     0x7f62b4bbe0aa - rustc_query_system::query::plumbing::get_query_impl::haac35b1fc122feea
  52:     0x7f62b4beb36e - rustc_query_system::query::plumbing::ensure_query_impl::hfe7107aa10bc6206
  53:     0x7f62b4b2bedf - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h4a1ab70d40d9ace6
  54:     0x7f62b4c576c0 - rustc_hir::hir::Crate::par_visit_all_item_likes::hfb0c04483e676c08
  55:     0x7f62b4b560f8 - rustc_session::session::Session::track_errors::hf65fd8ea70fab05a
  56:     0x7f62b4b257ad - rustc_typeck::check_crate::h129f49e683dec6ca
  57:     0x7f62b43a5d7b - rustc_interface::passes::analysis::haed903c33956c28b
  58:     0x7f62b3ea0d92 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute::h407a9953b5b74ba9
  59:     0x7f62b3ebc2a5 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::he7b6136bd92b8766
  60:     0x7f62b3ea1e25 - rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}::{{closure}}::hec9f59b817102522
  61:     0x7f62b3eb62fb - rustc_query_system::query::plumbing::get_query_impl::h42739219882a3165
  62:     0x7f62b3ea4095 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::h136cd37fe00c7049
  63:     0x7f62b402d96d - rustc_span::with_source_map::hdfa547cd4d1341a2
  64:     0x7f62b3ea5038 - rustc_interface::interface::create_compiler_and_run::h10b475d531695c0e
  65:     0x7f62b4038bfd - std::sys_common::backtrace::__rust_begin_short_backtrace::h4c9162f49c0dc935
  66:     0x7f62b403b9be - core::ops::function::FnOnce::call_once{{vtable.shim}}::hbba71a1842b71242
  67:     0x7f62b2f8ec3a - std::sys::unix::thread::Thread::new::thread_start::hdc96d124dc384f80
  68:     0x7f62afd8d422 - start_thread
  69:     0x7f62b2d90bf3 - __clone
  70:                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.47.0-dev running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [const_eval_raw] const-evaluating `ArithArrayLen::0::{{constant}}#0`
#1 [const_eval_validated] const-evaluating + checking `ArithArrayLen::0::{{constant}}#0`
#2 [const_eval_validated] const-evaluating + checking `ArithArrayLen::0::{{constant}}#0`
#3 [check_item_well_formed] checking that `ArithArrayLen` is well-formed
#4 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: src/librustc_middle/ty/subst.rs:569:17: const parameter `CFG/#0` (Const { ty: Config, val: Param(CFG/#0) }/0) out of range when substituting substs=[]

thread 'rustc' panicked at 'Box<Any>', /home/matthias/vcs/github/rust/library/std/src/macros.rs:13:23
stack backtrace:
   0:     0x7f62b2fb3d91 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9a65342185cb7022
   1:     0x7f62b30222cd - core::fmt::write::hc3de054a6627b208
   2:     0x7f62b2f93ab3 - std::io::Write::write_fmt::h64bd8d8dca95fd5c
   3:     0x7f62b2f8cb10 - std::panicking::default_hook::{{closure}}::ha9c6947a872dc513
   4:     0x7f62b2f8c74d - std::panicking::default_hook::h3e5e46d076456208
   5:     0x7f62b4071269 - rustc_driver::report_ice::he0572c9ff71e0a8c
   6:     0x7f62b2f8d156 - std::panicking::rust_panic_with_hook::h30c558028146672c
   7:     0x7f62b652656d - std::panicking::begin_panic::{{closure}}::h96c5d8b23c10b36a
   8:     0x7f62b6526356 - std::sys_common::backtrace::__rust_end_short_backtrace::h98f679cf3c561f3c
   9:     0x7f62b633111f - std::panicking::begin_panic::h65c51a53a81437fd
  10:     0x7f62b669cbec - rustc_errors::HandlerInner::span_bug::ha07457fa25949e84
  11:     0x7f62b669d2f0 - rustc_errors::Handler::span_bug::hbb74711f3db8ebf3
  12:     0x7f62b6624018 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::h4a7f07794a96b9b2
  13:     0x7f62b660a703 - rustc_middle::ty::context::tls::with_opt::{{closure}}::h19e60cd4fc7d8059
  14:     0x7f62b660a669 - rustc_middle::ty::context::tls::with_opt::h346f3e655bc513dc
  15:     0x7f62b6623f17 - rustc_middle::util::bug::opt_span_bug_fmt::h35bf29c4eb538873
  16:     0x7f62b6623ed1 - rustc_middle::util::bug::span_bug_fmt::h280140fbfd3b6cca
  17:     0x7f62b65f48a3 - <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::TypeFolder>::fold_const::h7a50de3c95311e03
  18:     0x7f62b5544add - rustc_middle::ty::normalize_erasing_regions::<impl rustc_middle::ty::context::TyCtxt>::subst_and_normalize_erasing_regions::h79e6d568f2bee0ca
  19:     0x7f62b5273fbb - rustc_mir::interpret::operand::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_operand::hccef71beb839ca33
  20:     0x7f62b529dcfc - rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_rvalue_into_place::hbc3e67db53b60802
  21:     0x7f62b5290dad - rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::run::h4e302c3d25a3f08c
  22:     0x7f62b53a592f - rustc_mir::const_eval::eval_queries::const_eval_raw_provider::h105f922d09dd2652
  23:     0x7f62b5317524 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_raw>::compute::h04b2e5889c7d6d53
  24:     0x7f62b5174949 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h3dd8792e6d237967
  25:     0x7f62b532777e - rustc_data_structures::stack::ensure_sufficient_stack::h2228541d95921492
  26:     0x7f62b5575cb3 - rustc_query_system::query::plumbing::get_query_impl::h240b503fbcb2e001
  27:     0x7f62b53a3677 - rustc_mir::const_eval::eval_queries::const_eval_validated_provider::h98bdfd50fd8392b3
  28:     0x7f62b5318274 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_validated>::compute::he4d9d5d8296e782d
  29:     0x7f62b51814a9 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hc6404f0b5657110e
  30:     0x7f62b53264ee - rustc_data_structures::stack::ensure_sufficient_stack::h0172bed68fd28962
  31:     0x7f62b5596e2c - rustc_query_system::query::plumbing::get_query_impl::h6cf806f9a2b220d0
  32:     0x7f62b53a3435 - rustc_mir::const_eval::eval_queries::const_eval_validated_provider::h98bdfd50fd8392b3
  33:     0x7f62b664d988 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_validated>::compute::he4d9d5d8296e782d
  34:     0x7f62b6827323 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h17ccf27999cdbfda
  35:     0x7f62b650de78 - rustc_data_structures::stack::ensure_sufficient_stack::hc7371369bc18827b
  36:     0x7f62b66ae4ec - rustc_query_system::query::plumbing::get_query_impl::h15cc98afa5331b5b
  37:     0x7f62b65ca3bc - rustc_middle::mir::interpret::queries::<impl rustc_middle::ty::context::TyCtxt>::const_eval_global_id::hfa304b68111680d4
  38:     0x7f62b65ca106 - rustc_middle::mir::interpret::queries::<impl rustc_middle::ty::context::TyCtxt>::const_eval_resolve::hb1504079523452e5
  39:     0x7f62b6062576 - <rustc_trait_selection::traits::project::AssocTypeNormalizer as rustc_middle::ty::fold::TypeFolder>::fold_const::h65300d88b63174b3
  40:     0x7f62b5f85dd3 - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::fold::TypeFoldable for &rustc_middle::ty::TyS>::super_fold_with::he97e902ca453e8c0
  41:     0x7f62b6061d6e - <rustc_trait_selection::traits::project::AssocTypeNormalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty::hee19f5e41aedb6b5
  42:     0x7f62b499ca0a - rustc_data_structures::stack::ensure_sufficient_stack::hbe260e288157ed57
  43:     0x7f62b4bf9000 - rustc_trait_selection::traits::project::normalize::h5613c8bfc5d74e91
  44:     0x7f62b4ae185a - rustc_typeck::check::Inherited::normalize_associated_types_in::hca1c0f4febcd9d20
  45:     0x7f62b4c31e72 - <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter::h2e262052cec849ed
  46:     0x7f62b4addcb8 - rustc_typeck::check::InheritedBuilder::enter::h82ba0d79645e3160
  47:     0x7f62b49f5d01 - rustc_typeck::check::wfcheck::check_item_well_formed::hee3ec82e08558fbf
  48:     0x7f62b4947a4e - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::check_item_well_formed>::compute::h2ec5d177707c5676
  49:     0x7f62b496f260 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h9a8f7b2c07d7db3d
  50:     0x7f62b4982a69 - rustc_data_structures::stack::ensure_sufficient_stack::h0d95f890c0ba21cd
  51:     0x7f62b4bbe0aa - rustc_query_system::query::plumbing::get_query_impl::haac35b1fc122feea
  52:     0x7f62b4beb36e - rustc_query_system::query::plumbing::ensure_query_impl::hfe7107aa10bc6206
  53:     0x7f62b4b2bedf - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h4a1ab70d40d9ace6
  54:     0x7f62b4c576c0 - rustc_hir::hir::Crate::par_visit_all_item_likes::hfb0c04483e676c08
  55:     0x7f62b4b560f8 - rustc_session::session::Session::track_errors::hf65fd8ea70fab05a
  56:     0x7f62b4b257ad - rustc_typeck::check_crate::h129f49e683dec6ca
  57:     0x7f62b43a5d7b - rustc_interface::passes::analysis::haed903c33956c28b
  58:     0x7f62b3ea0d92 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute::h407a9953b5b74ba9
  59:     0x7f62b3ebc2a5 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::he7b6136bd92b8766
  60:     0x7f62b3ea1e25 - rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}::{{closure}}::hec9f59b817102522
  61:     0x7f62b3eb62fb - rustc_query_system::query::plumbing::get_query_impl::h42739219882a3165
  62:     0x7f62b3ea4095 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::h136cd37fe00c7049
  63:     0x7f62b402d96d - rustc_span::with_source_map::hdfa547cd4d1341a2
  64:     0x7f62b3ea5038 - rustc_interface::interface::create_compiler_and_run::h10b475d531695c0e
  65:     0x7f62b4038bfd - std::sys_common::backtrace::__rust_begin_short_backtrace::h4c9162f49c0dc935
  66:     0x7f62b403b9be - core::ops::function::FnOnce::call_once{{vtable.shim}}::hbba71a1842b71242
  67:     0x7f62b2f8ec3a - std::sys::unix::thread::Thread::new::thread_start::hdc96d124dc384f80
  68:     0x7f62afd8d422 - start_thread
  69:     0x7f62b2d90bf3 - __clone
  70:                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.47.0-dev running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [const_eval_raw] const-evaluating `B::arr::{{constant}}#0`
#1 [const_eval_validated] const-evaluating + checking `B::arr::{{constant}}#0`
#2 [const_eval_validated] const-evaluating + checking `B::arr::{{constant}}#0`
#3 [check_item_well_formed] checking that `B` is well-formed
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 4 previous errors

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

Activity

  1. added
    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.
    on Aug 13, 2020
  2. lcnr commented on Aug 14, 2020

    @lcnr
    Contributor

    this is pretty much a duplicate of #69913, we will hopefully be able to prevent these ICE on stable soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)C-bugCategory: This is a bug.F-const_generics`#![feature(const_generics)]`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.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions