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: to get the signature of a closure, use substs.as_closure().sig() not fn_sig(), const_trait_impl #102985

Closed
matthiaskrgr opened this issue Oct 12, 2022 · 0 comments · Fixed by #102999
Assignees
Labels
C-bug Category: This is a bug. F-const_trait_impl `#![feature(const_trait_impl)]` 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

struct Bug {
    inner: [(); match || 1 {
        n => n(),
    }],
}

fn main() {}

Meta

rustc --version --verbose:

binary: rustc
commit-hash: c0983a9aac889d16722a12602ac678051e62c3fb
commit-date: 2022-10-12
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2

Error output

rustc /tmp/im/85871.rs "-Zcrate-attr=feature(const_trait_impl)"

error[E0277]: the trait bound `[closure@/tmp/im/85871.rs:2:23: 2:25]: ~const Fn<()>` is not satisfied
 --> /tmp/im/85871.rs:3:14
  |
3 |         n => n(),
  |              ^^^ expected an `Fn<()>` closure, found `[closure@/tmp/im/85871.rs:2:23: 2:25]`
  |
  = help: the trait `~const Fn<()>` is not implemented for closure `[closure@/tmp/im/85871.rs:2:23: 2:25]`
note: the trait `Fn<()>` is implemented for `[closure@/tmp/im/85871.rs:2:23: 2:25]`, but that implementation is not `const`
 --> /tmp/im/85871.rs:3:14
  |
3 |         n => n(),
  |              ^^^
  = note: wrap the `[closure@/tmp/im/85871.rs:2:23: 2:25]` in a closure with no arguments: `|| { /* code */ }`
Backtrace

error: internal compiler error: compiler/rustc_hir_analysis/src/collect.rs:1209:13: to get the signature of a closure, use `substs.as_closure().sig()` not `fn_sig()`

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/compiler/rustc_errors/src/lib.rs:1514:9
stack backtrace:
   0:     0x7f3efe39f510 - std::backtrace_rs::backtrace::libunwind::trace::h3e77d209dbe25d44
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f3efe39f510 - std::backtrace_rs::backtrace::trace_unsynchronized::h7b51789e46abdb59
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f3efe39f510 - std::sys_common::backtrace::_print_fmt::h29c0cf5b16446d6c
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f3efe39f510 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he2b16940c12b0a1c
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f3efe3fb52e - core::fmt::write::h87402e19ed548a07
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/core/src/fmt/mod.rs:1209:17
   5:     0x7f3efe38f8d5 - std::io::Write::write_fmt::h4871973da13e833c
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/io/mod.rs:1680:15
   6:     0x7f3efe3a22b3 - std::sys_common::backtrace::_print::hfbc51fe555810664
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f3efe3a22b3 - std::sys_common::backtrace::print::h51f4b0d418249766
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f3efe3a22b3 - std::panicking::default_hook::{{closure}}::h9a4f152744c1006f
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/panicking.rs:267:22
   9:     0x7f3efe3a1f8a - std::panicking::default_hook::h342cf3f3815b35a4
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/panicking.rs:286:9
  10:     0x7f3f00cd80c4 - <rustc_driver[2ce373a3066cd694]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[b44479f04a4f3c57]::ops::function::FnOnce<(&core[b44479f04a4f3c57]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f3efe3a2be9 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h14db2eb2fca0bbfe
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/alloc/src/boxed.rs:1952:9
  12:     0x7f3efe3a2be9 - std::panicking::rust_panic_with_hook::hf0aa4307dfa3e7bd
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/panicking.rs:692:13
  13:     0x7f3f01cc6691 - std[a7762567910d876]::panicking::begin_panic::<rustc_errors[f1492c8dc3d41fc3]::ExplicitBug>::{closure#0}
  14:     0x7f3f01cc4256 - std[a7762567910d876]::sys_common::backtrace::__rust_end_short_backtrace::<std[a7762567910d876]::panicking::begin_panic<rustc_errors[f1492c8dc3d41fc3]::ExplicitBug>::{closure#0}, !>
  15:     0x7f3f01cc32a6 - std[a7762567910d876]::panicking::begin_panic::<rustc_errors[f1492c8dc3d41fc3]::ExplicitBug>
  16:     0x7f3f01cd8d46 - std[a7762567910d876]::panic::panic_any::<rustc_errors[f1492c8dc3d41fc3]::ExplicitBug>
  17:     0x7f3f01cd610d - <rustc_errors[f1492c8dc3d41fc3]::HandlerInner>::bug::<&alloc[9b336c69fc0e610]::string::String>
  18:     0x7f3f01cd5ba0 - <rustc_errors[f1492c8dc3d41fc3]::Handler>::bug::<&alloc[9b336c69fc0e610]::string::String>
  19:     0x7f3f01d1bc4d - rustc_middle[473057399b575ec4]::ty::context::tls::with_context_opt::<rustc_middle[473057399b575ec4]::ty::context::tls::with_opt<rustc_middle[473057399b575ec4]::util::bug::opt_span_bug_fmt<rustc_span[a1e896da66381243]::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
  20:     0x7f3f01d1ca66 - rustc_middle[473057399b575ec4]::util::bug::opt_span_bug_fmt::<rustc_span[a1e896da66381243]::span_encoding::Span>
  21:     0x7f3eff5ebc13 - rustc_middle[473057399b575ec4]::util::bug::bug_fmt
  22:     0x7f3f0007c901 - rustc_hir_analysis[c191598a44e25655]::collect::fn_sig
  23:     0x7f3f0026f49b - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_span[a1e896da66381243]::def_id::DefId, rustc_middle[473057399b575ec4]::ty::sty::Binder<rustc_middle[473057399b575ec4]::ty::sty::FnSig>>>
  24:     0x7f3f00bdd75c - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::fn_sig
  25:     0x7f3f00c6889f - rustc_middle[473057399b575ec4]::ty::util::is_intrinsic
  26:     0x7f3effeece61 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_span[a1e896da66381243]::def_id::DefId, bool>>
  27:     0x7f3f00be108c - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::is_intrinsic
  28:     0x7f3f003ea0bb - <rustc_const_eval[d3298ff19f399c7e]::transform::check_consts::check::Checker as rustc_middle[473057399b575ec4]::mir::visit::Visitor>::visit_terminator
  29:     0x7f3f003e7649 - <rustc_const_eval[d3298ff19f399c7e]::transform::check_consts::check::Checker as rustc_middle[473057399b575ec4]::mir::visit::Visitor>::visit_basic_block_data
  30:     0x7f3f003e4dfa - <rustc_const_eval[d3298ff19f399c7e]::transform::check_consts::check::Checker>::check_body
  31:     0x7f3f003e3125 - rustc_mir_transform[2f610bf837682fb1]::mir_const_qualif
  32:     0x7f3f003e28d9 - <rustc_mir_transform[2f610bf837682fb1]::provide::{closure#0} as core[b44479f04a4f3c57]::ops::function::FnOnce<(rustc_middle[473057399b575ec4]::ty::context::TyCtxt, rustc_span[a1e896da66381243]::def_id::DefId)>>::call_once
  33:     0x7f3f003fc5be - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_span[a1e896da66381243]::def_id::DefId, rustc_middle[473057399b575ec4]::mir::query::ConstQualifs>>
  34:     0x7f3f00bda783 - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::mir_const_qualif
  35:     0x7f3effd17fd9 - rustc_mir_transform[2f610bf837682fb1]::mir_promoted
  36:     0x7f3f005bc5de - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_middle[473057399b575ec4]::ty::WithOptConstParam<rustc_span[a1e896da66381243]::def_id::LocalDefId>, (&rustc_data_structures[83761ebde738b01a]::steal::Steal<rustc_middle[473057399b575ec4]::mir::Body>, &rustc_data_structures[83761ebde738b01a]::steal::Steal<rustc_index[bcf49c45a7381bf0]::vec::IndexVec<rustc_middle[473057399b575ec4]::mir::Promoted, rustc_middle[473057399b575ec4]::mir::Body>>)>>
  37:     0x7f3f00bdaf81 - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::mir_promoted
  38:     0x7f3effad06f4 - rustc_borrowck[cabf4c989831a31e]::mir_borrowck
  39:     0x7f3effad0221 - <rustc_borrowck[cabf4c989831a31e]::provide::{closure#0} as core[b44479f04a4f3c57]::ops::function::FnOnce<(rustc_middle[473057399b575ec4]::ty::context::TyCtxt, rustc_span[a1e896da66381243]::def_id::LocalDefId)>>::call_once
  40:     0x7f3f0029b1c5 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_span[a1e896da66381243]::def_id::LocalDefId, &rustc_middle[473057399b575ec4]::mir::query::BorrowCheckResult>>
  41:     0x7f3f00bddcbe - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::mir_borrowck
  42:     0x7f3eff6e3b28 - <rustc_middle[473057399b575ec4]::ty::context::TyCtxt>::mir_borrowck_opt_const_arg
  43:     0x7f3eff6e2b9f - rustc_mir_transform[2f610bf837682fb1]::mir_drops_elaborated_and_const_checked
  44:     0x7f3f00277393 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_middle[473057399b575ec4]::ty::WithOptConstParam<rustc_span[a1e896da66381243]::def_id::LocalDefId>, &rustc_data_structures[83761ebde738b01a]::steal::Steal<rustc_middle[473057399b575ec4]::mir::Body>>>
  45:     0x7f3f00bdacde - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::mir_drops_elaborated_and_const_checked
  46:     0x7f3f006328f7 - rustc_mir_transform[2f610bf837682fb1]::inner_mir_for_ctfe
  47:     0x7f3f00632202 - rustc_mir_transform[2f610bf837682fb1]::mir_for_ctfe
  48:     0x7f3effdf33bb - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_span[a1e896da66381243]::def_id::DefId, &rustc_middle[473057399b575ec4]::mir::Body>>
  49:     0x7f3f00bdae1f - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::mir_for_ctfe
  50:     0x7f3effd282db - <rustc_const_eval[d3298ff19f399c7e]::interpret::eval_context::InterpCx<rustc_const_eval[d3298ff19f399c7e]::const_eval::machine::CompileTimeInterpreter>>::load_mir
  51:     0x7f3effd2587d - rustc_const_eval[d3298ff19f399c7e]::const_eval::eval_queries::eval_to_allocation_raw_provider
  52:     0x7f3f006c498f - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_middle[473057399b575ec4]::ty::ParamEnvAnd<rustc_middle[473057399b575ec4]::mir::interpret::GlobalId>, core[b44479f04a4f3c57]::result::Result<rustc_middle[473057399b575ec4]::mir::interpret::value::ConstAlloc, rustc_middle[473057399b575ec4]::mir::interpret::error::ErrorHandled>>>
  53:     0x7f3f00bdddf6 - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::eval_to_allocation_raw
  54:     0x7f3effd262f3 - rustc_const_eval[d3298ff19f399c7e]::const_eval::eval_queries::eval_to_allocation_raw_provider
  55:     0x7f3f006c498f - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_middle[473057399b575ec4]::ty::ParamEnvAnd<rustc_middle[473057399b575ec4]::mir::interpret::GlobalId>, core[b44479f04a4f3c57]::result::Result<rustc_middle[473057399b575ec4]::mir::interpret::value::ConstAlloc, rustc_middle[473057399b575ec4]::mir::interpret::error::ErrorHandled>>>
  56:     0x7f3f00bdddf6 - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::eval_to_allocation_raw
  57:     0x7f3f0095e46d - rustc_const_eval[d3298ff19f399c7e]::const_eval::eval_to_valtree
  58:     0x7f3f0095e340 - <rustc_const_eval[d3298ff19f399c7e]::provide::{closure#0} as core[b44479f04a4f3c57]::ops::function::FnOnce<(rustc_middle[473057399b575ec4]::ty::context::TyCtxt, rustc_middle[473057399b575ec4]::ty::ParamEnvAnd<rustc_middle[473057399b575ec4]::mir::interpret::GlobalId>)>>::call_once
  59:     0x7f3f008e3e9a - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_middle[473057399b575ec4]::ty::ParamEnvAnd<rustc_middle[473057399b575ec4]::mir::interpret::GlobalId>, core[b44479f04a4f3c57]::result::Result<core[b44479f04a4f3c57]::option::Option<rustc_middle[473057399b575ec4]::ty::consts::valtree::ValTree>, rustc_middle[473057399b575ec4]::mir::interpret::error::ErrorHandled>>>
  60:     0x7f3f008e3a41 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::get_query::<rustc_query_impl[da48dab4873aad47]::queries::eval_to_valtree, rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt>
  61:     0x7f3f008e3961 - <rustc_query_impl[da48dab4873aad47]::Queries as rustc_middle[473057399b575ec4]::ty::query::QueryEngine>::eval_to_valtree
  62:     0x7f3eff6157db - <rustc_middle[473057399b575ec4]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  63:     0x7f3eff6154f4 - <rustc_middle[473057399b575ec4]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  64:     0x7f3eff6150e0 - <rustc_middle[473057399b575ec4]::ty::consts::Const>::eval
  65:     0x7f3eff60f418 - <rustc_trait_selection[f78ff7b6cab63cf]::traits::project::AssocTypeNormalizer as rustc_middle[473057399b575ec4]::ty::fold::TypeFolder>::fold_const
  66:     0x7f3eff5bf94f - <rustc_trait_selection[f78ff7b6cab63cf]::traits::project::AssocTypeNormalizer as rustc_middle[473057399b575ec4]::ty::fold::TypeFolder>::fold_ty
  67:     0x7f3f0040cff4 - <rustc_trait_selection[f78ff7b6cab63cf]::traits::engine::ObligationCtxt>::normalize::<rustc_middle[473057399b575ec4]::ty::Ty>
  68:     0x7f3f00425a41 - <core[b44479f04a4f3c57]::iter::adapters::map::Map<core[b44479f04a4f3c57]::slice::iter::Iter<rustc_hir[6028453cf4b2108a]::hir::FieldDef>, <rustc_hir_analysis[c191598a44e25655]::check::wfcheck::WfCheckingCtxt>::non_enum_variant::{closure#0}> as core[b44479f04a4f3c57]::iter::traits::iterator::Iterator>::fold::<(), core[b44479f04a4f3c57]::iter::traits::iterator::Iterator::for_each::call<rustc_hir_analysis[c191598a44e25655]::check::wfcheck::AdtField, <alloc[9b336c69fc0e610]::vec::Vec<rustc_hir_analysis[c191598a44e25655]::check::wfcheck::AdtField> as alloc[9b336c69fc0e610]::vec::spec_extend::SpecExtend<rustc_hir_analysis[c191598a44e25655]::check::wfcheck::AdtField, core[b44479f04a4f3c57]::iter::adapters::map::Map<core[b44479f04a4f3c57]::slice::iter::Iter<rustc_hir[6028453cf4b2108a]::hir::FieldDef>, <rustc_hir_analysis[c191598a44e25655]::check::wfcheck::WfCheckingCtxt>::non_enum_variant::{closure#0}>>>::spec_extend::{closure#0}>::{closure#0}>
  69:     0x7f3f004257d6 - <alloc[9b336c69fc0e610]::vec::Vec<rustc_hir_analysis[c191598a44e25655]::check::wfcheck::AdtField> as alloc[9b336c69fc0e610]::vec::spec_from_iter::SpecFromIter<rustc_hir_analysis[c191598a44e25655]::check::wfcheck::AdtField, core[b44479f04a4f3c57]::iter::adapters::map::Map<core[b44479f04a4f3c57]::slice::iter::Iter<rustc_hir[6028453cf4b2108a]::hir::FieldDef>, <rustc_hir_analysis[c191598a44e25655]::check::wfcheck::WfCheckingCtxt>::non_enum_variant::{closure#0}>>>::from_iter
  70:     0x7f3f004033f5 - rustc_hir_analysis[c191598a44e25655]::check::wfcheck::check_well_formed
  71:     0x7f3effbdda95 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::get_query::<rustc_query_impl[da48dab4873aad47]::queries::check_well_formed, rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt>
  72:     0x7f3f0075f61f - rustc_data_structures[83761ebde738b01a]::sync::par_for_each_in::<&[rustc_hir[6028453cf4b2108a]::hir::ItemId], <rustc_middle[473057399b575ec4]::hir::ModuleItems>::par_items<rustc_hir_analysis[c191598a44e25655]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>
  73:     0x7f3f00b25e71 - rustc_hir_analysis[c191598a44e25655]::check::wfcheck::check_mod_type_wf
  74:     0x7f3f002db145 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<rustc_span[a1e896da66381243]::def_id::LocalDefId, ()>>
  75:     0x7f3f00713139 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::get_query::<rustc_query_impl[da48dab4873aad47]::queries::check_mod_type_wf, rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt>
  76:     0x7f3f006d6578 - rustc_data_structures[83761ebde738b01a]::sync::par_for_each_in::<&[rustc_hir[6028453cf4b2108a]::hir_id::OwnerId], <rustc_middle[473057399b575ec4]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[c191598a44e25655]::check_crate::{closure#5}::{closure#0}::{closure#0}>::{closure#0}>
  77:     0x7f3f006d6383 - <rustc_session[6fcce47f22942431]::session::Session>::track_errors::<rustc_hir_analysis[c191598a44e25655]::check_crate::{closure#5}, ()>
  78:     0x7f3f006d54b0 - rustc_hir_analysis[c191598a44e25655]::check_crate
  79:     0x7f3f006d5037 - rustc_interface[36e01ffb98afbff3]::passes::analysis
  80:     0x7f3f00a72a84 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::try_execute_query::<rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt, rustc_query_system[3b799635b0bc3b6a]::query::caches::DefaultCache<(), core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>>>
  81:     0x7f3f00a727b7 - rustc_query_system[3b799635b0bc3b6a]::query::plumbing::get_query::<rustc_query_impl[da48dab4873aad47]::queries::analysis, rustc_query_impl[da48dab4873aad47]::plumbing::QueryCtxt>
  82:     0x7f3eff8d64d3 - <rustc_interface[36e01ffb98afbff3]::passes::QueryContext>::enter::<rustc_driver[2ce373a3066cd694]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>>
  83:     0x7f3eff8cf308 - rustc_interface[36e01ffb98afbff3]::interface::create_compiler_and_run::<core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>, rustc_driver[2ce373a3066cd694]::run_compiler::{closure#1}>
  84:     0x7f3eff8ce132 - <scoped_tls[a9b05a2643ce58fe]::ScopedKey<rustc_span[a1e896da66381243]::SessionGlobals>>::set::<rustc_interface[36e01ffb98afbff3]::interface::run_compiler<core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>, rustc_driver[2ce373a3066cd694]::run_compiler::{closure#1}>::{closure#0}, core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>>
  85:     0x7f3eff8cd60f - std[a7762567910d876]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[36e01ffb98afbff3]::util::run_in_thread_pool_with_globals<rustc_interface[36e01ffb98afbff3]::interface::run_compiler<core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>, rustc_driver[2ce373a3066cd694]::run_compiler::{closure#1}>::{closure#0}, core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>>::{closure#0}, core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>>
  86:     0x7f3f00afb78f - <<std[a7762567910d876]::thread::Builder>::spawn_unchecked_<rustc_interface[36e01ffb98afbff3]::util::run_in_thread_pool_with_globals<rustc_interface[36e01ffb98afbff3]::interface::run_compiler<core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>, rustc_driver[2ce373a3066cd694]::run_compiler::{closure#1}>::{closure#0}, core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>>::{closure#0}, core[b44479f04a4f3c57]::result::Result<(), rustc_errors[f1492c8dc3d41fc3]::ErrorGuaranteed>>::{closure#1} as core[b44479f04a4f3c57]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  87:     0x7f3efe3ac703 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hedc2749a204bec26
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/alloc/src/boxed.rs:1938:9
  88:     0x7f3efe3ac703 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hffc7feefd4927bf2
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/alloc/src/boxed.rs:1938:9
  89:     0x7f3efe3ac703 - std::sys::unix::thread::Thread::new::thread_start::hfe6e8fbc240c0d8a
                               at /rustc/c0983a9aac889d16722a12602ac678051e62c3fb/library/std/src/sys/unix/thread.rs:108:17
  90:     0x7f3efe1028fd - <unknown>
  91:     0x7f3efe184a60 - <unknown>
  92:                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.66.0-nightly (c0983a9aa 2022-10-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z crate-attr=feature(const_trait_impl)

query stack during panic:
#0 [fn_sig] computing function signature of `Bug::inner::{constant#0}::{closure#0}`
#1 [is_intrinsic] is_intrinsic(Bug::inner::{constant#0}::{closure#0})
#2 [mir_const_qualif] const checking `Bug::inner::{constant#0}`
#3 [mir_promoted] processing `Bug::inner::{constant#0}`
#4 [mir_borrowck] borrow-checking `Bug::inner::{constant#0}`
#5 [mir_drops_elaborated_and_const_checked] elaborating drops for `Bug::inner::{constant#0}`
#6 [mir_for_ctfe] caching mir of `Bug::inner::{constant#0}` for CTFE
#7 [eval_to_allocation_raw] const-evaluating + checking `Bug::inner::{constant#0}`
#8 [eval_to_allocation_raw] const-evaluating + checking `Bug::inner::{constant#0}`
#9 [eval_to_valtree] evaluating type-level constant
#10 [check_well_formed] checking that `Bug` is well-formed
#11 [check_mod_type_wf] checking that types are well-formed in top-level module
#12 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors

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

@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 Oct 12, 2022
@compiler-errors compiler-errors self-assigned this Oct 13, 2022
@bors bors closed this as completed in 0f12b40 Oct 13, 2022
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)]` 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.

2 participants