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]: ICE error when using async_fn_in_trait and const_trait_impl features simultaneously #117634

Open
2 of 4 tasks
iamanonymouscs opened this issue Nov 6, 2023 · 1 comment
Labels
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-const_trait_impl `#![feature(const_trait_impl)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@iamanonymouscs
Copy link

Code

#![feature(async_fn_in_trait)]
#![feature(const_trait_impl)]

#![allow(incomplete_features)]

pub trait Foo {
    async fn foo(&mut self);
}

impl<T: Foo> Foo  for &mut T{
    async fn foo(&mut self) {
        match () {
            const { (|| {()})() } => {}
        }
    }
}

Affected release channels

  • Previous Stable
  • Current Stable
  • Current Beta
  • Current Nightly

Rust Version

rustc 1.75.0-nightly (fee5518cd 2023-11-05)
binary: rustc
commit-hash: fee5518cdd4435c60a57fe3bb734fc1a14abeb7a
commit-date: 2023-11-05
host: x86_64-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 17.0.4

Current error output

error[E0670]: `async fn` is not permitted in Rust 2015
 --> code.rs:7:5
  |
7 |     async fn foo(&mut self);
  |     ^^^^^ to use `async fn`, switch to Rust 2018 or later
  |
  = help: pass `--edition 2021` to `rustc`
  = note: for more on editions, read https://doc.rust-lang.org/edition-guide

error[E0670]: `async fn` is not permitted in Rust 2015
  --> code.rs:11:5
   |
11 |     async fn foo(&mut self) {
   |     ^^^^^ to use `async fn`, switch to Rust 2018 or later
   |
   = help: pass `--edition 2021` to `rustc`
   = note: for more on editions, read https://doc.rust-lang.org/edition-guide

error[E0658]: inline-const in pattern position is experimental
  --> code.rs:13:13
   |
13 |             const { (|| {()})() } => {}
   |             ^^^^^
   |
   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `code`
  --> code.rs:16:2
   |
16 | }
   |  ^ consider adding a `main` function to `code.rs`

warning: the feature `async_fn_in_trait` has been stable since 1.75.0-nightly and no longer requires an attribute to enable
 --> code.rs:1:12
  |
1 | #![feature(async_fn_in_trait)]
  |            ^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

error: internal compiler error: compiler/rustc_middle/src/ty/generic_args.rs:399:45: expected type for param #0 in [ReErased, T/#1, i8, Binder(extern "RustCall" fn(()), []), ()]

Backtrace

thread 'rustc' panicked at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/compiler/rustc_errors/src/lib.rs:1661:9:
Box<dyn Any>
stack backtrace:
   0:     0x7f4dc4be4cfc - std::backtrace_rs::backtrace::libunwind::trace::hbe19b9ec19549d8b
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f4dc4be4cfc - std::backtrace_rs::backtrace::trace_unsynchronized::h6d94c36d49721251
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4dc4be4cfc - std::sys_common::backtrace::_print_fmt::hc303a306f265b5ef
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f4dc4be4cfc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h221b7c7ec7428f0c
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f4dc4c46f20 - core::fmt::rt::Argument::fmt::h59656340112ee5fd
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/core/src/fmt/rt.rs:142:9
   5:     0x7f4dc4c46f20 - core::fmt::write::h3955ebe73e7c24f4
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/core/src/fmt/mod.rs:1117:17
   6:     0x7f4dc4bd8b8f - std::io::Write::write_fmt::h77b17b2494df0384
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/io/mod.rs:1763:15
   7:     0x7f4dc4be4ae4 - std::sys_common::backtrace::_print::h6c7d2a1a7e16a934
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f4dc4be4ae4 - std::sys_common::backtrace::print::he05db4534040faa6
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f4dc4be7777 - std::panicking::default_hook::{{closure}}::h6bbf5ca2e7803768
  10:     0x7f4dc4be74df - std::panicking::default_hook::h9e25fac0ca8c0472
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/panicking.rs:292:9
  11:     0x7f4dc775e660 - std[f1680e40f2363332]::panicking::update_hook::<alloc[9c8c15f78f14b4ba]::boxed::Box<rustc_driver_impl[9b8a01a6f67b728]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f4dc4be7eb8 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h44955b1f6545581a
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/alloc/src/boxed.rs:2021:9
  13:     0x7f4dc4be7eb8 - std::panicking::rust_panic_with_hook::h1278b38991797f78
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/panicking.rs:783:13
  14:     0x7f4dc7b22a94 - std[f1680e40f2363332]::panicking::begin_panic::<rustc_errors[89eaf8cd7b2d2c3a]::ExplicitBug>::{closure#0}
  15:     0x7f4dc7b1a296 - std[f1680e40f2363332]::sys_common::backtrace::__rust_end_short_backtrace::<std[f1680e40f2363332]::panicking::begin_panic<rustc_errors[89eaf8cd7b2d2c3a]::ExplicitBug>::{closure#0}, !>
  16:     0x7f4dc7b14d66 - std[f1680e40f2363332]::panicking::begin_panic::<rustc_errors[89eaf8cd7b2d2c3a]::ExplicitBug>
  17:     0x7f4dc7afbf54 - <rustc_errors[89eaf8cd7b2d2c3a]::HandlerInner>::bug::<alloc[9c8c15f78f14b4ba]::string::String>
  18:     0x7f4dc7afbd14 - <rustc_errors[89eaf8cd7b2d2c3a]::Handler>::bug::<alloc[9c8c15f78f14b4ba]::string::String>
  19:     0x7f4dc7b9caad - rustc_middle[6619026fb430307d]::util::bug::opt_span_bug_fmt::<rustc_span[6035f655ab1e5d39]::span_encoding::Span>::{closure#0}
  20:     0x7f4dc7b849da - rustc_middle[6619026fb430307d]::ty::context::tls::with_opt::<rustc_middle[6619026fb430307d]::util::bug::opt_span_bug_fmt<rustc_span[6035f655ab1e5d39]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f4dc7b84878 - rustc_middle[6619026fb430307d]::ty::context::tls::with_context_opt::<rustc_middle[6619026fb430307d]::ty::context::tls::with_opt<rustc_middle[6619026fb430307d]::util::bug::opt_span_bug_fmt<rustc_span[6035f655ab1e5d39]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f4dc5c49830 - rustc_middle[6619026fb430307d]::util::bug::bug_fmt
  23:     0x7f4dc7b9d73a - rustc_middle[6619026fb430307d]::util::call_kind::call_kind
  24:     0x7f4dc77242dc - <rustc_const_eval[945a0d533730a8db]::transform::check_consts::ops::FnCallNonConst as rustc_const_eval[945a0d533730a8db]::transform::check_consts::ops::NonConstOp>::build_error
  25:     0x7f4dc7720c02 - <rustc_const_eval[945a0d533730a8db]::transform::check_consts::check::Checker>::check_op_spanned::<rustc_const_eval[945a0d533730a8db]::transform::check_consts::ops::FnCallNonConst>
  26:     0x7f4dc8fffbbf - <rustc_const_eval[945a0d533730a8db]::transform::check_consts::check::Checker as rustc_middle[6619026fb430307d]::mir::visit::Visitor>::visit_terminator
  27:     0x7f4dc6d98c1a - <rustc_const_eval[945a0d533730a8db]::transform::check_consts::check::Checker as rustc_middle[6619026fb430307d]::mir::visit::Visitor>::visit_basic_block_data
  28:     0x7f4dc8ebf413 - <rustc_const_eval[945a0d533730a8db]::transform::check_consts::check::Checker>::check_body
  29:     0x7f4dc923ccfe - rustc_mir_transform[5164bd9bcb8f45cc]::mir_const_qualif
  30:     0x7f4dc923cb75 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_const_qualif::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 5usize]>>
  31:     0x7f4dc923c37e - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_span[6035f655ab1e5d39]::def_id::DefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 5usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  32:     0x7f4dc923c130 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_const_qualif::get_query_non_incr::__rust_end_short_backtrace
  33:     0x7f4dc6d79e1b - rustc_mir_transform[5164bd9bcb8f45cc]::mir_promoted
  34:     0x7f4dc8e29752 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 16usize]>>
  35:     0x7f4dc8e299c0 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  36:     0x7f4dc8e29653 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7f4dc95f6cc3 - rustc_borrowck[d493e5d200bb2a27]::mir_borrowck
  38:     0x7f4dc95f6c2f - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  39:     0x7f4dc898736c - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  40:     0x7f4dc8986f90 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7f4dc6610f17 - rustc_mir_transform[5164bd9bcb8f45cc]::mir_drops_elaborated_and_const_checked
  42:     0x7f4dc8987135 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  43:     0x7f4dc898736c - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  44:     0x7f4dc8986c90 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7f4dc9133191 - rustc_mir_transform[5164bd9bcb8f45cc]::mir_for_ctfe
  46:     0x7f4dc88d2569 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_for_ctfe::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  47:     0x7f4dc88d2085 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_span[6035f655ab1e5d39]::def_id::DefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  48:     0x7f4dc88d169e - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_for_ctfe::get_query_non_incr::__rust_end_short_backtrace
  49:     0x7f4dc9655a59 - rustc_const_eval[945a0d533730a8db]::const_eval::eval_queries::eval_in_interpreter
  50:     0x7f4dc96548b5 - rustc_const_eval[945a0d533730a8db]::const_eval::eval_queries::eval_to_allocation_raw_provider
  51:     0x7f4dc9654435 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 24usize]>>
  52:     0x7f4dc8db5e10 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_middle[6619026fb430307d]::ty::ParamEnvAnd<rustc_middle[6619026fb430307d]::mir::interpret::GlobalId>, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  53:     0x7f4dc8db5a70 - rustc_query_impl[ecee174baa6465c1]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  54:     0x7f4dc8c8803e - rustc_const_eval[945a0d533730a8db]::const_eval::eval_to_valtree
  55:     0x7f4dc8c87ea2 - <rustc_const_eval[945a0d533730a8db]::provide::{closure#0} as core[e7d9b10fc4b648d1]::ops::function::FnOnce<(rustc_middle[6619026fb430307d]::ty::context::TyCtxt, rustc_middle[6619026fb430307d]::ty::ParamEnvAnd<rustc_middle[6619026fb430307d]::mir::interpret::GlobalId>)>>::call_once
  56:     0x7f4dc8c87e76 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 24usize]>>
  57:     0x7f4dc8db6427 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_middle[6619026fb430307d]::ty::ParamEnvAnd<rustc_middle[6619026fb430307d]::mir::interpret::GlobalId>, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  58:     0x7f4dc8db5870 - rustc_query_impl[ecee174baa6465c1]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  59:     0x7f4dc8db506a - rustc_middle[6619026fb430307d]::query::plumbing::query_get_at::<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_middle[6619026fb430307d]::ty::ParamEnvAnd<rustc_middle[6619026fb430307d]::mir::interpret::GlobalId>, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 24usize]>>>
  60:     0x7f4dc8db444a - <rustc_middle[6619026fb430307d]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  61:     0x7f4dc9d18937 - <rustc_mir_build[f6e508f92c0f686d]::thir::pattern::PatCtxt>::lower_lit.cold.0
  62:     0x7f4dc8db0e94 - <rustc_mir_build[f6e508f92c0f686d]::thir::pattern::PatCtxt>::lower_pattern
  63:     0x7f4dc8dba11b - <rustc_mir_build[f6e508f92c0f686d]::thir::cx::Cx>::mirror_expr
  64:     0x7f4dc8db6e8d - <rustc_mir_build[f6e508f92c0f686d]::thir::cx::Cx>::mirror_block
  65:     0x7f4dc8db8080 - <rustc_mir_build[f6e508f92c0f686d]::thir::cx::Cx>::mirror_expr
  66:     0x7f4dc8dba76c - <rustc_mir_build[f6e508f92c0f686d]::thir::cx::Cx>::mirror_expr
  67:     0x7f4dc8db6e8d - <rustc_mir_build[f6e508f92c0f686d]::thir::cx::Cx>::mirror_block
  68:     0x7f4dc8db8080 - <rustc_mir_build[f6e508f92c0f686d]::thir::cx::Cx>::mirror_expr
  69:     0x7f4dc8dadf06 - rustc_mir_build[f6e508f92c0f686d]::thir::cx::thir_body
  70:     0x7f4dc8dad8f4 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::thir_body::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 16usize]>>
  71:     0x7f4dc8e299aa - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  72:     0x7f4dc8accc57 - rustc_query_impl[ecee174baa6465c1]::query_impl::thir_body::get_query_non_incr::__rust_end_short_backtrace
  73:     0x7f4dc8accd10 - rustc_mir_build[f6e508f92c0f686d]::thir::pattern::check_match::check_match
  74:     0x7f4dc8accc89 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::check_match::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 1usize]>>
  75:     0x7f4dc8bc4d78 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  76:     0x7f4dc8bc4a5d - rustc_query_impl[ecee174baa6465c1]::query_impl::check_match::get_query_non_incr::__rust_end_short_backtrace
  77:     0x7f4dc8d72c3a - rustc_mir_build[f6e508f92c0f686d]::build::mir_built
  78:     0x7f4dc8d72af1 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  79:     0x7f4dc898736c - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  80:     0x7f4dc8986d50 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  81:     0x7f4dc6159ede - rustc_mir_transform[5164bd9bcb8f45cc]::check_unsafety::unsafety_check_result
  82:     0x7f4dc8987147 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::unsafety_check_result::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  83:     0x7f4dc898736c - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  84:     0x7f4dc8986e10 - rustc_query_impl[ecee174baa6465c1]::query_impl::unsafety_check_result::get_query_non_incr::__rust_end_short_backtrace
  85:     0x7f4dc615d62b - rustc_mir_transform[5164bd9bcb8f45cc]::check_unsafety::unsafety_check_result
  86:     0x7f4dc8987147 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::unsafety_check_result::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  87:     0x7f4dc898736c - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  88:     0x7f4dc8986e10 - rustc_query_impl[ecee174baa6465c1]::query_impl::unsafety_check_result::get_query_non_incr::__rust_end_short_backtrace
  89:     0x7f4dc8bc525a - rustc_mir_transform[5164bd9bcb8f45cc]::mir_const
  90:     0x7f4dc8bc51ad - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_const::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  91:     0x7f4dc898736c - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  92:     0x7f4dc8986ed0 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_const::get_query_non_incr::__rust_end_short_backtrace
  93:     0x7f4dc6d79caa - rustc_mir_transform[5164bd9bcb8f45cc]::mir_promoted
  94:     0x7f4dc8e29752 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 16usize]>>
  95:     0x7f4dc8e299c0 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
  96:     0x7f4dc8e29653 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  97:     0x7f4dc95f6cc3 - rustc_borrowck[d493e5d200bb2a27]::mir_borrowck
  98:     0x7f4dc95f6c2f - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
  99:     0x7f4dc898736c - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::VecCache<rustc_span[6035f655ab1e5d39]::def_id::LocalDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
 100:     0x7f4dc8986f90 - rustc_query_impl[ecee174baa6465c1]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
 101:     0x7f4dc953367f - rustc_hir_analysis[a4a439b5b0d3c431]::collect::type_of::type_of_opaque
 102:     0x7f4dc9533449 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
 103:     0x7f4dc88d2085 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_span[6035f655ab1e5d39]::def_id::DefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
 104:     0x7f4dc984795e - rustc_query_impl[ecee174baa6465c1]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
 105:     0x7f4dc898bfb7 - rustc_middle[6619026fb430307d]::query::plumbing::query_get_at::<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_span[6035f655ab1e5d39]::def_id::DefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>>
 106:     0x7f4dc5f9f218 - rustc_hir_analysis[a4a439b5b0d3c431]::collect::type_of::type_of
 107:     0x7f4dc88d2ca9 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
 108:     0x7f4dc88d2085 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_span[6035f655ab1e5d39]::def_id::DefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
 109:     0x7f4dc88d1cab - rustc_query_impl[ecee174baa6465c1]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
 110:     0x7f4dc8ef8a96 - rustc_middle[6619026fb430307d]::query::plumbing::query_get_at::<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_span[6035f655ab1e5d39]::def_id::DefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>>
 111:     0x7f4dc8ae7ae3 - <rustc_privacy[6dc1b70a4e16ef91]::EmbargoVisitor as rustc_hir[17c6bb8c8c1c8532]::intravisit::Visitor>::visit_item
 112:     0x7f4dc89b4a0e - <rustc_middle[6619026fb430307d]::hir::map::Map>::visit_all_item_likes_in_crate::<rustc_privacy[6dc1b70a4e16ef91]::EmbargoVisitor>
 113:     0x7f4dc89b60f8 - rustc_privacy[6dc1b70a4e16ef91]::effective_visibilities
 114:     0x7f4dc89b5f7d - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::effective_visibilities::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>
 115:     0x7f4dc93fa5a5 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::SingleCache<rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
 116:     0x7f4dc93f9d06 - rustc_query_impl[ecee174baa6465c1]::query_impl::effective_visibilities::get_query_non_incr::__rust_end_short_backtrace
 117:     0x7f4dc8d3a599 - rustc_hir_analysis[a4a439b5b0d3c431]::check::check::check_impl_items_against_trait
 118:     0x7f4dc9456185 - rustc_hir_analysis[a4a439b5b0d3c431]::check::check::check_mod_item_types
 119:     0x7f4dc9455df9 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 0usize]>>
 120:     0x7f4dc92379c8 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::DefaultCache<rustc_span[6035f655ab1e5d39]::def_id::LocalModDefId, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
 121:     0x7f4dc9237357 - rustc_query_impl[ecee174baa6465c1]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
 122:     0x7f4dc8b78ff2 - rustc_hir_analysis[a4a439b5b0d3c431]::check_crate
 123:     0x7f4dc922f096 - rustc_interface[572be4898179a35d]::passes::analysis
 124:     0x7f4dc922eab5 - rustc_query_impl[ecee174baa6465c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ecee174baa6465c1]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 1usize]>>
 125:     0x7f4dc9392726 - rustc_query_system[b725a46ba76d9304]::query::plumbing::try_execute_query::<rustc_query_impl[ecee174baa6465c1]::DynamicConfig<rustc_query_system[b725a46ba76d9304]::query::caches::SingleCache<rustc_middle[6619026fb430307d]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ecee174baa6465c1]::plumbing::QueryCtxt, false>
 126:     0x7f4dc9392555 - rustc_query_impl[ecee174baa6465c1]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
 127:     0x7f4dc947fcc6 - rustc_interface[572be4898179a35d]::interface::run_compiler::<core[e7d9b10fc4b648d1]::result::Result<(), rustc_span[6035f655ab1e5d39]::ErrorGuaranteed>, rustc_driver_impl[9b8a01a6f67b728]::run_compiler::{closure#1}>::{closure#0}
 128:     0x7f4dc97daf6d - std[f1680e40f2363332]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[572be4898179a35d]::util::run_in_thread_with_globals<rustc_interface[572be4898179a35d]::interface::run_compiler<core[e7d9b10fc4b648d1]::result::Result<(), rustc_span[6035f655ab1e5d39]::ErrorGuaranteed>, rustc_driver_impl[9b8a01a6f67b728]::run_compiler::{closure#1}>::{closure#0}, core[e7d9b10fc4b648d1]::result::Result<(), rustc_span[6035f655ab1e5d39]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e7d9b10fc4b648d1]::result::Result<(), rustc_span[6035f655ab1e5d39]::ErrorGuaranteed>>
 129:     0x7f4dc97dadc5 - <<std[f1680e40f2363332]::thread::Builder>::spawn_unchecked_<rustc_interface[572be4898179a35d]::util::run_in_thread_with_globals<rustc_interface[572be4898179a35d]::interface::run_compiler<core[e7d9b10fc4b648d1]::result::Result<(), rustc_span[6035f655ab1e5d39]::ErrorGuaranteed>, rustc_driver_impl[9b8a01a6f67b728]::run_compiler::{closure#1}>::{closure#0}, core[e7d9b10fc4b648d1]::result::Result<(), rustc_span[6035f655ab1e5d39]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e7d9b10fc4b648d1]::result::Result<(), rustc_span[6035f655ab1e5d39]::ErrorGuaranteed>>::{closure#1} as core[e7d9b10fc4b648d1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
 130:     0x7f4dc4bf2c25 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he0933d4d918a24ed
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/alloc/src/boxed.rs:2007:9
 131:     0x7f4dc4bf2c25 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd4192338c0cd95d1
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/alloc/src/boxed.rs:2007:9
 132:     0x7f4dc4bf2c25 - std::sys::unix::thread::Thread::new::thread_start::haa2877bab3139f3e
                               at /rustc/fee5518cdd4435c60a57fe3bb734fc1a14abeb7a/library/std/src/sys/unix/thread.rs:108:17
 133:     0x7f4dc4ae2609 - start_thread
 134:     0x7f4dc4a05133 - clone
 135:                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: please attach the file at `/home/rustc-ice-2023-11-06T14_58_34-6825.txt` to your bug report

query stack during panic:
#0 [mir_const_qualif] const checking `<impl at code.rs:10:1: 10:29>::foo::{closure#0}::{constant#0}`
#1 [mir_promoted] promoting constants in MIR for `<impl at code.rs:10:1: 10:29>::foo::{closure#0}::{constant#0}`
#2 [mir_borrowck] borrow-checking `<impl at code.rs:10:1: 10:29>::foo::{closure#0}::{constant#0}`
#3 [mir_drops_elaborated_and_const_checked] elaborating drops for `<impl at code.rs:10:1: 10:29>::foo::{closure#0}::{constant#0}`
#4 [mir_for_ctfe] caching mir of `<impl at code.rs:10:1: 10:29>::foo::{closure#0}::{constant#0}` for CTFE
#5 [eval_to_allocation_raw] const-evaluating + checking `<impl at code.rs:10:1: 10:29>::foo::{closure#0}::{constant#0}`
#6 [eval_to_valtree] evaluating type-level constant
#7 [thir_body] building THIR for `<impl at code.rs:10:1: 10:29>::foo::{closure#0}`
#8 [check_match] match-checking `<impl at code.rs:10:1: 10:29>::foo::{closure#0}`
#9 [mir_built] building MIR for `<impl at code.rs:10:1: 10:29>::foo::{closure#0}`
#10 [unsafety_check_result] unsafety-checking `<impl at code.rs:10:1: 10:29>::foo::{closure#0}`
#11 [unsafety_check_result] unsafety-checking `<impl at code.rs:10:1: 10:29>::foo`
#12 [mir_const] preparing `<impl at code.rs:10:1: 10:29>::foo` for borrow checking
#13 [mir_promoted] promoting constants in MIR for `<impl at code.rs:10:1: 10:29>::foo`
#14 [mir_borrowck] borrow-checking `<impl at code.rs:10:1: 10:29>::foo`
#15 [type_of_opaque] computing type of opaque `<impl at code.rs:10:1: 10:29>::foo::{opaque#0}`
#16 [type_of] computing type of `<impl at code.rs:10:1: 10:29>::foo::{opaque#0}`
#17 [effective_visibilities] checking effective visibilities
#18 [check_mod_item_types] checking item types in top-level module
#19 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 5 previous errors; 1 warning emitted

Anything else?

No response

@iamanonymouscs iamanonymouscs added C-bug Category: This is a bug. 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. labels Nov 6, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 6, 2023
@compiler-errors compiler-errors added requires-nightly This issue requires a nightly compiler in some way. F-const_trait_impl `#![feature(const_trait_impl)]` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 6, 2023
@matthiaskrgr
Copy link
Member

Regression in nightly-2023-07-29

Regression in aafd75a
#114134

@matthiaskrgr matthiaskrgr added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Apr 19, 2024
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. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. F-const_trait_impl `#![feature(const_trait_impl)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants