Skip to content

ICE: expected type of closure body to be a closure or coroutine #113776

Description

@matthiaskrgr

Code

rustc --edition=2021 code.rs

#![feature(generic_const_exprs)]
fn f<T>(
    data: &[(); {
         let f: F = async { 1 };

         1
     }],
) -> impl Iterator<Item = SubAssign> {
}

Meta

rustc --version --verbose:

rustc 1.73.0-nightly (4c8bb79d9 2023-07-15)
binary: rustc
commit-hash: 4c8bb79d9f565115637cc6da739f8389e79f3a29
commit-date: 2023-07-15
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5

Error output

error[E0412]: cannot find type `F` in this scope
  --> treereduce.out:4:17
   |
4  |          let f: F = async { 1 };
   |                 ^
   |
  ::: /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:76:1
   |
76 | pub trait Fn<Args: Tuple>: FnMut<Args> {
   | -------------------------------------- similarly named trait `Fn` defined here
   |
help: a trait with a similar name exists
   |
4  |          let f: Fn = async { 1 };
   |                 ~~
help: you might be missing a type parameter
   |
2  | fn f<T, F>(
   |       +++

error[E0412]: cannot find type `SubAssign` in this scope
 --> treereduce.out:8:27
  |
8 | ) -> impl Iterator<Item = SubAssign> {
  |                           ^^^^^^^^^ not found in this scope
  |
help: consider importing one of these items
  |
2 + use core::ops::SubAssign;
  |
2 + use std::ops::SubAssign;
  |

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> treereduce.out:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
  = note: `#[warn(incomplete_features)]` on by default

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

warning: unused variable: `data`
 --> treereduce.out:3:5
  |
3 |     data: &[(); {
  |     ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
  |
  = note: `#[warn(unused_variables)]` on by default
Backtrace

error: internal compiler error: compiler/rustc_mir_build/src/build/mod.rs:634:22: expected closure or generator, found {type error}

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/compiler/rustc_errors/src/lib.rs:1651:9
stack backtrace:
   0:     0x7f6d73f641e1 - std::backtrace_rs::backtrace::libunwind::trace::h3b5c50f24cf4b35a
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f6d73f641e1 - std::backtrace_rs::backtrace::trace_unsynchronized::he026a26ead582316
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6d73f641e1 - std::sys_common::backtrace::_print_fmt::h76fd67678968a4e3
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f6d73f641e1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdd83524e3f3c2be2
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f6d73fca19c - core::fmt::rt::Argument::fmt::h654276e7f109452e
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/core/src/fmt/rt.rs:138:9
   5:     0x7f6d73fca19c - core::fmt::write::h138407e966f7b43b
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f6d73f56b8e - std::io::Write::write_fmt::h2424dcece48dafda
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/io/mod.rs:1714:15
   7:     0x7f6d73f63ff5 - std::sys_common::backtrace::_print::hed0bf89a99fb894c
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f6d73f63ff5 - std::sys_common::backtrace::print::h247f5c941c9353a5
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f6d73f66da3 - std::panicking::default_hook::{{closure}}::hcccd6b964b717049
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/panicking.rs:269:22
  10:     0x7f6d73f66b34 - std::panicking::default_hook::hce795b61120bca6d
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/panicking.rs:288:9
  11:     0x7f6d771f827b - <rustc_driver_impl[36a7eaa3807b03c1]::install_ice_hook::{closure#0} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(&core[81c8fe8a09de0f06]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7f6d73f675ce - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3187784b6c983a99
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/alloc/src/boxed.rs:2021:9
  13:     0x7f6d73f675ce - std::panicking::rust_panic_with_hook::h46c9d18986d08847
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/panicking.rs:709:13
  14:     0x7f6d77789ca1 - std[fa39155a576d62c5]::panicking::begin_panic::<rustc_errors[bc298e2df4c98b78]::ExplicitBug>::{closure#0}
  15:     0x7f6d77789896 - std[fa39155a576d62c5]::sys_common::backtrace::__rust_end_short_backtrace::<std[fa39155a576d62c5]::panicking::begin_panic<rustc_errors[bc298e2df4c98b78]::ExplicitBug>::{closure#0}, !>
  16:     0x7f6d777fba86 - std[fa39155a576d62c5]::panicking::begin_panic::<rustc_errors[bc298e2df4c98b78]::ExplicitBug>
  17:     0x7f6d777f9154 - <rustc_errors[bc298e2df4c98b78]::HandlerInner>::bug::<alloc[2889214108738437]::string::String>
  18:     0x7f6d777f8f68 - <rustc_errors[bc298e2df4c98b78]::Handler>::bug::<alloc[2889214108738437]::string::String>
  19:     0x7f6d7771fcbc - rustc_middle[bafd45fe52eb4faf]::util::bug::opt_span_bug_fmt::<rustc_span[d4de8c39017ea598]::span_encoding::Span>::{closure#0}
  20:     0x7f6d7771afba - rustc_middle[bafd45fe52eb4faf]::ty::context::tls::with_opt::<rustc_middle[bafd45fe52eb4faf]::util::bug::opt_span_bug_fmt<rustc_span[d4de8c39017ea598]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f6d7771af88 - rustc_middle[bafd45fe52eb4faf]::ty::context::tls::with_context_opt::<rustc_middle[bafd45fe52eb4faf]::ty::context::tls::with_opt<rustc_middle[bafd45fe52eb4faf]::util::bug::opt_span_bug_fmt<rustc_span[d4de8c39017ea598]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f6d75fcf380 - rustc_middle[bafd45fe52eb4faf]::util::bug::bug_fmt
  23:     0x7f6d7782c0c5 - rustc_mir_build[cab3407ed0d16561]::build::construct_error
  24:     0x7f6d7617a670 - rustc_mir_build[cab3407ed0d16561]::build::mir_built
  25:     0x7f6d752634ac - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>
  26:     0x7f6d7526348e - <rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_built::dynamic_query::{closure#2} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(rustc_middle[bafd45fe52eb4faf]::ty::context::TyCtxt, rustc_span[d4de8c39017ea598]::def_id::LocalDefId)>>::call_once
  27:     0x7f6d7533caad - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::VecCache<rustc_span[d4de8c39017ea598]::def_id::LocalDefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  28:     0x7f6d76b2aa2f - rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7f6d76377576 - rustc_mir_transform[7f2cf7a5dd3bd755]::check_unsafety::unsafety_check_result
  30:     0x7f6d752634ec - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::unsafety_check_result::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>
  31:     0x7f6d752634ce - <rustc_query_impl[f1760b35ee71e15a]::query_impl::unsafety_check_result::dynamic_query::{closure#2} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(rustc_middle[bafd45fe52eb4faf]::ty::context::TyCtxt, rustc_span[d4de8c39017ea598]::def_id::LocalDefId)>>::call_once
  32:     0x7f6d7533caad - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::VecCache<rustc_span[d4de8c39017ea598]::def_id::LocalDefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  33:     0x7f6d76b2d0ff - rustc_query_impl[f1760b35ee71e15a]::query_impl::unsafety_check_result::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7f6d763b1368 - rustc_mir_transform[7f2cf7a5dd3bd755]::mir_const
  35:     0x7f6d7527d72e - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_const::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>
  36:     0x7f6d7527d6fe - <rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_const::dynamic_query::{closure#2} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(rustc_middle[bafd45fe52eb4faf]::ty::context::TyCtxt, rustc_span[d4de8c39017ea598]::def_id::LocalDefId)>>::call_once
  37:     0x7f6d7533caad - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::VecCache<rustc_span[d4de8c39017ea598]::def_id::LocalDefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  38:     0x7f6d76b51d8f - rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_const::get_query_non_incr::__rust_end_short_backtrace
  39:     0x7f6d7536bda9 - rustc_mir_transform[7f2cf7a5dd3bd755]::mir_promoted
  40:     0x7f6d7536bc01 - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 16usize]>>
  41:     0x7f6d7585383d - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::VecCache<rustc_span[d4de8c39017ea598]::def_id::LocalDefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  42:     0x7f6d76b51e85 - rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  43:     0x7f6d758827fc - rustc_borrowck[6067ff99a16e49f6]::mir_borrowck
  44:     0x7f6d7527d6ce - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>
  45:     0x7f6d7527d69e - <rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(rustc_middle[bafd45fe52eb4faf]::ty::context::TyCtxt, rustc_span[d4de8c39017ea598]::def_id::LocalDefId)>>::call_once
  46:     0x7f6d7533caad - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::VecCache<rustc_span[d4de8c39017ea598]::def_id::LocalDefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  47:     0x7f6d76b5c63f - rustc_query_impl[f1760b35ee71e15a]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  48:     0x7f6d76838e4f - <rustc_hir_analysis[51ced00d18f9db10]::collect::type_of::opaque::RpitConstraintChecker>::check
  49:     0x7f6d76838dbc - rustc_hir[98ac82fdf278d239]::intravisit::walk_block::<rustc_hir_analysis[51ced00d18f9db10]::collect::type_of::opaque::RpitConstraintChecker>
  50:     0x7f6d768765a1 - rustc_hir[98ac82fdf278d239]::intravisit::walk_fn::<rustc_hir_analysis[51ced00d18f9db10]::collect::type_of::opaque::RpitConstraintChecker>
  51:     0x7f6d76373c1a - rustc_hir[98ac82fdf278d239]::intravisit::walk_item::<rustc_hir_analysis[51ced00d18f9db10]::collect::type_of::opaque::RpitConstraintChecker>
  52:     0x7f6d763737bb - rustc_hir_analysis[51ced00d18f9db10]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  53:     0x7f6d763702bd - rustc_hir_analysis[51ced00d18f9db10]::collect::type_of::type_of
  54:     0x7f6d7534efd3 - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>
  55:     0x7f6d7534ef90 - <rustc_query_impl[f1760b35ee71e15a]::query_impl::type_of::dynamic_query::{closure#2} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(rustc_middle[bafd45fe52eb4faf]::ty::context::TyCtxt, rustc_span[d4de8c39017ea598]::def_id::DefId)>>::call_once
  56:     0x7f6d7526e175 - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::DefaultCache<rustc_span[d4de8c39017ea598]::def_id::DefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  57:     0x7f6d76b68b61 - rustc_query_impl[f1760b35ee71e15a]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  58:     0x7f6d761b0080 - rustc_middle[bafd45fe52eb4faf]::query::plumbing::query_get_at::<rustc_query_system[a39b5eca44b3ed3c]::query::caches::DefaultCache<rustc_span[d4de8c39017ea598]::def_id::DefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 8usize]>>>
  59:     0x7f6d761a9edc - rustc_hir_analysis[51ced00d18f9db10]::check::check::check_mod_item_types
  60:     0x7f6d75f5db6c - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 0usize]>>
  61:     0x7f6d75f5db4e - <rustc_query_impl[f1760b35ee71e15a]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(rustc_middle[bafd45fe52eb4faf]::ty::context::TyCtxt, rustc_span[d4de8c39017ea598]::def_id::LocalDefId)>>::call_once
  62:     0x7f6d75b52b2f - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::VecCache<rustc_span[d4de8c39017ea598]::def_id::LocalDefId, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  63:     0x7f6d76b2da22 - rustc_query_impl[f1760b35ee71e15a]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  64:     0x7f6d766af077 - <rustc_middle[bafd45fe52eb4faf]::hir::map::Map>::for_each_module::<rustc_hir_analysis[51ced00d18f9db10]::check_crate::{closure#6}::{closure#0}>
  65:     0x7f6d766ae2ed - <rustc_session[b1a5d361b73cfad9]::session::Session>::time::<(), rustc_hir_analysis[51ced00d18f9db10]::check_crate::{closure#6}>
  66:     0x7f6d766acf1a - rustc_hir_analysis[51ced00d18f9db10]::check_crate
  67:     0x7f6d766a433a - rustc_interface[b60702df0ae80ef4]::passes::analysis
  68:     0x7f6d7667fb3a - rustc_query_impl[f1760b35ee71e15a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f1760b35ee71e15a]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 1usize]>>
  69:     0x7f6d7667fb29 - <rustc_query_impl[f1760b35ee71e15a]::query_impl::analysis::dynamic_query::{closure#2} as core[81c8fe8a09de0f06]::ops::function::FnOnce<(rustc_middle[bafd45fe52eb4faf]::ty::context::TyCtxt, ())>>::call_once
  70:     0x7f6d7685bc68 - rustc_query_system[a39b5eca44b3ed3c]::query::plumbing::try_execute_query::<rustc_query_impl[f1760b35ee71e15a]::DynamicConfig<rustc_query_system[a39b5eca44b3ed3c]::query::caches::SingleCache<rustc_middle[bafd45fe52eb4faf]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[f1760b35ee71e15a]::plumbing::QueryCtxt, false>
  71:     0x7f6d7685ba47 - rustc_query_impl[f1760b35ee71e15a]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  72:     0x7f6d7646e835 - <rustc_middle[bafd45fe52eb4faf]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[36a7eaa3807b03c1]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>>
  73:     0x7f6d7646de62 - <rustc_interface[b60702df0ae80ef4]::interface::Compiler>::enter::<rustc_driver_impl[36a7eaa3807b03c1]::run_compiler::{closure#1}::{closure#2}, core[81c8fe8a09de0f06]::result::Result<core[81c8fe8a09de0f06]::option::Option<rustc_interface[b60702df0ae80ef4]::queries::Linker>, rustc_span[d4de8c39017ea598]::ErrorGuaranteed>>
  74:     0x7f6d764671d5 - rustc_span[d4de8c39017ea598]::set_source_map::<core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>, rustc_interface[b60702df0ae80ef4]::interface::run_compiler<core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>, rustc_driver_impl[36a7eaa3807b03c1]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  75:     0x7f6d76466c46 - <scoped_tls[121ecede58d5c05f]::ScopedKey<rustc_span[d4de8c39017ea598]::SessionGlobals>>::set::<rustc_interface[b60702df0ae80ef4]::interface::run_compiler<core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>, rustc_driver_impl[36a7eaa3807b03c1]::run_compiler::{closure#1}>::{closure#0}, core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>>
  76:     0x7f6d7646620c - std[fa39155a576d62c5]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b60702df0ae80ef4]::util::run_in_thread_pool_with_globals<rustc_interface[b60702df0ae80ef4]::interface::run_compiler<core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>, rustc_driver_impl[36a7eaa3807b03c1]::run_compiler::{closure#1}>::{closure#0}, core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>>
  77:     0x7f6d76465fce - <<std[fa39155a576d62c5]::thread::Builder>::spawn_unchecked_<rustc_interface[b60702df0ae80ef4]::util::run_in_thread_pool_with_globals<rustc_interface[b60702df0ae80ef4]::interface::run_compiler<core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>, rustc_driver_impl[36a7eaa3807b03c1]::run_compiler::{closure#1}>::{closure#0}, core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[81c8fe8a09de0f06]::result::Result<(), rustc_span[d4de8c39017ea598]::ErrorGuaranteed>>::{closure#1} as core[81c8fe8a09de0f06]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  78:     0x7f6d73f71c55 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h83f49025b00909a5
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/alloc/src/boxed.rs:2007:9
  79:     0x7f6d73f71c55 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h21b0d4679eed4e05
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/alloc/src/boxed.rs:2007:9
  80:     0x7f6d73f71c55 - std::sys::unix::thread::Thread::new::thread_start::h030641e4e4790460
                               at /rustc/4c8bb79d9f565115637cc6da739f8389e79f3a29/library/std/src/sys/unix/thread.rs:108:17
  81:     0x7f6d73d0444b - <unknown>
  82:     0x7f6d73d87e40 - <unknown>
  83:                0x0 - <unknown>

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.73.0-nightly (4c8bb79d9 2023-07-15) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_built] building MIR for `f::{constant#0}::{closure#0}`
#1 [unsafety_check_result] unsafety-checking `f::{constant#0}::{closure#0}`
#2 [mir_const] preparing `f::{constant#0}::{closure#0}` for borrow checking
#3 [mir_promoted] promoting constants in MIR for `f::{constant#0}::{closure#0}`
#4 [mir_borrowck] borrow-checking `f::{constant#0}::{closure#0}`
#5 [type_of] computing type of `f::{opaque#0}`
#6 [check_mod_item_types] checking item types in top-level module
#7 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 4 previous errors; 2 warnings emitted

Some errors have detailed explanations: E0412, E0601.
For more information about an error, try `rustc --explain E0412`.

Activity

  1. added
    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.
    C-bugCategory: This is a bug.
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    on Jul 17, 2023
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 17, 2023
  3. matthiaskrgr commented on Jul 17, 2023

    @matthiaskrgr
    MemberAuthor

    Regression in nightly-2022-11-25

    commit[0] 2022-11-23: Auto merge of #104410 - WaffleLapkin:unregress, r=estebank
    commit[1] 2022-11-24: Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser
    commit[2] 2022-11-24: Auto merge of #104610 - ouz-a:revert-overflow, r=compiler-errors
    commit[3] 2022-11-24: Auto merge of #103808 - cjgillot:vec-cache, r=TaKO8Ki
    commit[4] 2022-11-24: Auto merge of #104809 - matthiaskrgr:rollup-8abjdwh, r=matthiaskrgr
    commit[5] 2022-11-24: Auto merge of #104321 - Swatinem:async-gen, r=oli-obk // probably this one?
    commit[6] 2022-11-24: Auto merge of #103693 - HKalbasi:master, r=oli-obk

  4. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 23, 2023
  5. changed the title [-]ICE: `expected closure or generator, found {type error}`[/-] [+]ICE: `expected type of coroutine-like closure to be a coroutine`[/+] on Jan 1, 2024
  6. changed the title [-]ICE: `expected type of coroutine-like closure to be a coroutine`[/-] [+]ICE: `expected type of closure body to be a closure or coroutine`[/+] on Jan 7, 2024
  7. added
    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
    on Apr 19, 2024
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

    C-bugCategory: This is a bug.E-needs-testCall 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)]`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.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions