Open
Description
auto-reduced (treereduce-rust):
//@compile-flags: -Zmir-opt-level=5
#![feature(async_drop)]
async fn call_once(f: impl AsyncFnOnce()) {
let fut = Box::pin(f());
}
original:
//@ aux-build:block-on.rs
//@ edition:2018
//@ run-pass
//@ check-run-results
#![allow(unused)]
extern crate block_on;
struct DropMe(i32);
impl Drop for Drop {
fn drop(&mut self) {
println!("{} was dropped", self.0);
}
}
async fn call_once(f: impl AsyncFnOnce()) {
println!("before call");
let fut = Box::pin(f());
println!("after call");
println!("future dropped");
}
fn main() {
block_on::block_on(async {
let d = DropMe(42);
let async_closure = async move || {
let d = &d;
println!("called");
};
call_once(async_closure).await;
println!("after");
});
}
Version information
rustc 1.88.0-nightly (251cda5e1 2025-04-30)
binary: rustc
commit-hash: 251cda5e1f0057eb04fd9fc1653f2f1e010e8f97
commit-date: 2025-04-30
host: x86_64-unknown-linux-gnu
release: 1.88.0-nightly
LLVM version: 20.1.2
Possibly related line of code:
rust/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
Lines 165 to 177 in 251cda5
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zmir-opt-level=5 -Zcrate-attr=feature(async_drop)
Program output
error[E0670]: `async fn` is not permitted in Rust 2015
--> /tmp/icemaker_global_tempdir.B6FTKk3Kw7JK/rustc_testrunner_tmpdir_reporting.mQsy3fxIN2EW/mvce.rs:1:1
|
1 | async fn call_once(f: impl AsyncFnOnce()) {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
= help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
warning: the feature `async_drop` is incomplete and may not be safe to use and/or cause compiler crashes
--> <crate attribute>:1:12
|
1 | #![feature(async_drop)]
| ^^^^^^^^^^
|
= note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.B6FTKk3Kw7JK/rustc_testrunner_tmpdir_reporting.mQsy3fxIN2EW/mvce.rs:3:2
|
3 | }
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.B6FTKk3Kw7JK/rustc_testrunner_tmpdir_reporting.mQsy3fxIN2EW/mvce.rs`
warning: unused variable: `fut`
--> /tmp/icemaker_global_tempdir.B6FTKk3Kw7JK/rustc_testrunner_tmpdir_reporting.mQsy3fxIN2EW/mvce.rs:2:9
|
2 | let fut = Box::pin(f());
| ^^^ help: if this is intentional, prefix it with an underscore: `_fut`
|
= note: `#[warn(unused_variables)]` on by default
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:171:13: Failed to normalize *mut std::pin::Pin<std::boxed::Box<Alias(Projection, AliasTy { args: [impl AsyncFnOnce()/#0, ()], def_id: DefId(2:3751 ~ core[f0a6]::ops::async_function::AsyncFnOnce::CallOnceFuture), .. }), std::alloc::Global>> in typing_env=TypingEnv { typing_mode: PostAnalysis, param_env: ParamEnv { caller_bounds: [] } }, maybe try to call `try_normalize_erasing_regions` instead
thread 'rustc' panicked at compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:171:13:
Box<dyn Any>
stack backtrace:
0: 0x7ba035563863 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h20b93d714a840c17
1: 0x7ba035c059c7 - core::fmt::write::hbd4e43071f2b6280
2: 0x7ba03700a091 - std::io::Write::write_fmt::hd6609147c061a65a
3: 0x7ba0355636c2 - std::sys::backtrace::BacktraceLock::print::he17c913a476f0df2
4: 0x7ba03556750a - std::panicking::default_hook::{{closure}}::h387e3e0861f6ca39
5: 0x7ba03556708f - std::panicking::default_hook::h06a982276987baa3
6: 0x7ba0345a7633 - std[553e8cb93e7fb90]::panicking::update_hook::<alloc[6998e39f333261e4]::boxed::Box<rustc_driver_impl[48b038e11ca70c04]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7ba035567d83 - std::panicking::rust_panic_with_hook::h0279421d7919da67
8: 0x7ba0345e31a1 - std[553e8cb93e7fb90]::panicking::begin_panic::<rustc_errors[9c6bd54a8b3d7a47]::ExplicitBug>::{closure#0}
9: 0x7ba0345d71d6 - std[553e8cb93e7fb90]::sys::backtrace::__rust_end_short_backtrace::<std[553e8cb93e7fb90]::panicking::begin_panic<rustc_errors[9c6bd54a8b3d7a47]::ExplicitBug>::{closure#0}, !>
10: 0x7ba0345d7063 - std[553e8cb93e7fb90]::panicking::begin_panic::<rustc_errors[9c6bd54a8b3d7a47]::ExplicitBug>
11: 0x7ba0345ed811 - <rustc_errors[9c6bd54a8b3d7a47]::diagnostic::BugAbort as rustc_errors[9c6bd54a8b3d7a47]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
12: 0x7ba034c48f1a - rustc_middle[fe83ff8f6af0fa19]::util::bug::opt_span_bug_fmt::<rustc_span[1adb01313f1c57dc]::span_encoding::Span>::{closure#0}
13: 0x7ba034c2177a - rustc_middle[fe83ff8f6af0fa19]::ty::context::tls::with_opt::<rustc_middle[fe83ff8f6af0fa19]::util::bug::opt_span_bug_fmt<rustc_span[1adb01313f1c57dc]::span_encoding::Span>::{closure#0}, !>::{closure#0}
14: 0x7ba034c215eb - rustc_middle[fe83ff8f6af0fa19]::ty::context::tls::with_context_opt::<rustc_middle[fe83ff8f6af0fa19]::ty::context::tls::with_opt<rustc_middle[fe83ff8f6af0fa19]::util::bug::opt_span_bug_fmt<rustc_span[1adb01313f1c57dc]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
15: 0x7ba031e9d630 - rustc_middle[fe83ff8f6af0fa19]::util::bug::bug_fmt
16: 0x7ba03659c942 - <rustc_middle[fe83ff8f6af0fa19]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[72209fb0c9973b28]::fold::TypeFolder<rustc_middle[fe83ff8f6af0fa19]::ty::context::TyCtxt>>::fold_ty
17: 0x7ba036f6967d - rustc_mir_transform[13028d53c6d11955]::validate::validate_types
18: 0x7ba036cf49fe - <rustc_mir_transform[13028d53c6d11955]::validate::Validator as rustc_mir_transform[13028d53c6d11955]::pass_manager::MirPass>::run_pass
19: 0x7ba035c03c4e - rustc_mir_transform[13028d53c6d11955]::pass_manager::run_passes_inner
20: 0x7ba0365c707d - rustc_mir_transform[13028d53c6d11955]::run_optimization_passes
21: 0x7ba03641e67e - rustc_mir_transform[13028d53c6d11955]::shim::make_shim
22: 0x7ba03641c62f - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::mir_shims::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 8usize]>>
23: 0x7ba03641c5e7 - <rustc_query_impl[73ffed637ff28f75]::query_impl::mir_shims::dynamic_query::{closure#2} as core[f0a60fd3088b4ecc]::ops::function::FnOnce<(rustc_middle[fe83ff8f6af0fa19]::ty::context::TyCtxt, rustc_middle[fe83ff8f6af0fa19]::ty::instance::InstanceKind)>>::call_once
24: 0x7ba03631a8d2 - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_query_system[341c3edc9f45c813]::query::caches::DefaultCache<rustc_middle[fe83ff8f6af0fa19]::ty::instance::InstanceKind, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
25: 0x7ba03631a5eb - rustc_query_impl[73ffed637ff28f75]::query_impl::mir_shims::get_query_non_incr::__rust_end_short_backtrace
26: 0x7ba034c45d80 - <rustc_middle[fe83ff8f6af0fa19]::ty::context::TyCtxt>::coroutine_layout
27: 0x7ba0362281cf - rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached
28: 0x7ba036216e4e - rustc_ty_utils[7e79272ab878db29]::layout::layout_of
29: 0x7ba036216db2 - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>
30: 0x7ba036215baf - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_query_system[341c3edc9f45c813]::query::caches::DefaultCache<rustc_middle[fe83ff8f6af0fa19]::ty::PseudoCanonicalInput<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
31: 0x7ba0362157ee - rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
32: 0x7ba0362191a0 - <core[f0a60fd3088b4ecc]::iter::adapters::GenericShunt<core[f0a60fd3088b4ecc]::iter::adapters::by_ref_sized::ByRefSized<core[f0a60fd3088b4ecc]::iter::adapters::map::Map<core[f0a60fd3088b4ecc]::slice::iter::Iter<rustc_middle[fe83ff8f6af0fa19]::ty::VariantDef>, rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached::{closure#20}>>, core[f0a60fd3088b4ecc]::result::Result<core[f0a60fd3088b4ecc]::convert::Infallible, &rustc_middle[fe83ff8f6af0fa19]::ty::layout::LayoutError>> as core[f0a60fd3088b4ecc]::iter::traits::iterator::Iterator>::next
33: 0x7ba03621d244 - rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached
34: 0x7ba036216e4e - rustc_ty_utils[7e79272ab878db29]::layout::layout_of
35: 0x7ba036216db2 - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>
36: 0x7ba036215baf - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_query_system[341c3edc9f45c813]::query::caches::DefaultCache<rustc_middle[fe83ff8f6af0fa19]::ty::PseudoCanonicalInput<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
37: 0x7ba0362157ee - rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
38: 0x7ba036219550 - <core[f0a60fd3088b4ecc]::iter::adapters::GenericShunt<core[f0a60fd3088b4ecc]::iter::adapters::by_ref_sized::ByRefSized<core[f0a60fd3088b4ecc]::iter::adapters::map::Map<core[f0a60fd3088b4ecc]::slice::iter::Iter<rustc_middle[fe83ff8f6af0fa19]::ty::VariantDef>, rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached::{closure#20}>>, core[f0a60fd3088b4ecc]::result::Result<core[f0a60fd3088b4ecc]::convert::Infallible, &rustc_middle[fe83ff8f6af0fa19]::ty::layout::LayoutError>> as core[f0a60fd3088b4ecc]::iter::traits::iterator::Iterator>::next
39: 0x7ba03621d244 - rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached
40: 0x7ba036216e4e - rustc_ty_utils[7e79272ab878db29]::layout::layout_of
41: 0x7ba036216db2 - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>
42: 0x7ba036215baf - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_query_system[341c3edc9f45c813]::query::caches::DefaultCache<rustc_middle[fe83ff8f6af0fa19]::ty::PseudoCanonicalInput<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
43: 0x7ba0362157ee - rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
44: 0x7ba0362178a8 - rustc_ty_utils[7e79272ab878db29]::layout::layout_of
45: 0x7ba036216db2 - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>
46: 0x7ba036215baf - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_query_system[341c3edc9f45c813]::query::caches::DefaultCache<rustc_middle[fe83ff8f6af0fa19]::ty::PseudoCanonicalInput<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
47: 0x7ba0362157ee - rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
48: 0x7ba036214d89 - <rustc_middle[fe83ff8f6af0fa19]::ty::layout::LayoutCx as rustc_middle[fe83ff8f6af0fa19]::ty::layout::LayoutOf>::spanned_layout_of
49: 0x7ba0354cf3b0 - <core[f0a60fd3088b4ecc]::iter::adapters::GenericShunt<core[f0a60fd3088b4ecc]::iter::adapters::by_ref_sized::ByRefSized<core[f0a60fd3088b4ecc]::iter::adapters::map::Map<core[f0a60fd3088b4ecc]::slice::iter::Iter<rustc_middle[fe83ff8f6af0fa19]::mir::query::CoroutineSavedTy>, rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached::{closure#12}>>, core[f0a60fd3088b4ecc]::result::Result<core[f0a60fd3088b4ecc]::convert::Infallible, &rustc_middle[fe83ff8f6af0fa19]::ty::layout::LayoutError>> as core[f0a60fd3088b4ecc]::iter::traits::iterator::Iterator>::next
50: 0x7ba0354babda - core[f0a60fd3088b4ecc]::iter::adapters::try_process::<core[f0a60fd3088b4ecc]::iter::adapters::by_ref_sized::ByRefSized<core[f0a60fd3088b4ecc]::iter::adapters::map::Map<core[f0a60fd3088b4ecc]::slice::iter::Iter<rustc_middle[fe83ff8f6af0fa19]::mir::query::CoroutineSavedTy>, rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached::{closure#12}>>, rustc_abi[c43837ab31a6f7c2]::layout::ty::TyAndLayout<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>, core[f0a60fd3088b4ecc]::result::Result<core[f0a60fd3088b4ecc]::convert::Infallible, &rustc_middle[fe83ff8f6af0fa19]::ty::layout::LayoutError>, <core[f0a60fd3088b4ecc]::iter::adapters::map::Map<core[f0a60fd3088b4ecc]::slice::iter::Iter<rustc_middle[fe83ff8f6af0fa19]::mir::query::CoroutineSavedTy>, rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached::{closure#12}> as core[f0a60fd3088b4ecc]::iter::traits::iterator::Iterator>::try_collect<rustc_index[9438a2ca845a1647]::vec::IndexVec<rustc_middle[fe83ff8f6af0fa19]::mir::query::CoroutineSavedLocal, rustc_abi[c43837ab31a6f7c2]::layout::ty::TyAndLayout<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>>>::{closure#0}, rustc_index[9438a2ca845a1647]::vec::IndexVec<rustc_middle[fe83ff8f6af0fa19]::mir::query::CoroutineSavedLocal, rustc_abi[c43837ab31a6f7c2]::layout::ty::TyAndLayout<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>>>
51: 0x7ba0362287ef - rustc_ty_utils[7e79272ab878db29]::layout::layout_of_uncached
52: 0x7ba036216e4e - rustc_ty_utils[7e79272ab878db29]::layout::layout_of
53: 0x7ba036216db2 - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>
54: 0x7ba036215baf - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_query_system[341c3edc9f45c813]::query::caches::DefaultCache<rustc_middle[fe83ff8f6af0fa19]::ty::PseudoCanonicalInput<rustc_middle[fe83ff8f6af0fa19]::ty::Ty>, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
55: 0x7ba0362157ee - rustc_query_impl[73ffed637ff28f75]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
56: 0x7ba036a5c9ee - <rustc_mir_transform[13028d53c6d11955]::known_panics_lint::KnownPanicsLint as rustc_mir_transform[13028d53c6d11955]::pass_manager::MirLint>::run_lint
57: 0x7ba035c0bea7 - rustc_mir_transform[13028d53c6d11955]::run_analysis_to_runtime_passes
58: 0x7ba03645abe5 - rustc_mir_transform[13028d53c6d11955]::mir_drops_elaborated_and_const_checked
59: 0x7ba03645a5b7 - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 8usize]>>
60: 0x7ba035f8746c - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_data_structures[cad23842afe3738d]::vec_cache::VecCache<rustc_span[1adb01313f1c57dc]::def_id::LocalDefId, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[341c3edc9f45c813]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
61: 0x7ba035f86d4f - rustc_query_impl[73ffed637ff28f75]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
62: 0x7ba0366e66d8 - rustc_interface[39a942c1d345d61e]::passes::run_required_analyses
63: 0x7ba036af739e - rustc_interface[39a942c1d345d61e]::passes::analysis
64: 0x7ba036af736d - rustc_query_impl[73ffed637ff28f75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[73ffed637ff28f75]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 0usize]>>
65: 0x7ba036afce7d - rustc_query_system[341c3edc9f45c813]::query::plumbing::try_execute_query::<rustc_query_impl[73ffed637ff28f75]::DynamicConfig<rustc_query_system[341c3edc9f45c813]::query::caches::SingleCache<rustc_middle[fe83ff8f6af0fa19]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[73ffed637ff28f75]::plumbing::QueryCtxt, false>
66: 0x7ba036afcb78 - rustc_query_impl[73ffed637ff28f75]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
67: 0x7ba036b3a8be - rustc_interface[39a942c1d345d61e]::passes::create_and_enter_global_ctxt::<core[f0a60fd3088b4ecc]::option::Option<rustc_interface[39a942c1d345d61e]::queries::Linker>, rustc_driver_impl[48b038e11ca70c04]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
68: 0x7ba036c6b254 - rustc_interface[39a942c1d345d61e]::interface::run_compiler::<(), rustc_driver_impl[48b038e11ca70c04]::run_compiler::{closure#0}>::{closure#1}
69: 0x7ba036c92c74 - std[553e8cb93e7fb90]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[39a942c1d345d61e]::util::run_in_thread_with_globals<rustc_interface[39a942c1d345d61e]::util::run_in_thread_pool_with_globals<rustc_interface[39a942c1d345d61e]::interface::run_compiler<(), rustc_driver_impl[48b038e11ca70c04]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
70: 0x7ba036c930b4 - <<std[553e8cb93e7fb90]::thread::Builder>::spawn_unchecked_<rustc_interface[39a942c1d345d61e]::util::run_in_thread_with_globals<rustc_interface[39a942c1d345d61e]::util::run_in_thread_pool_with_globals<rustc_interface[39a942c1d345d61e]::interface::run_compiler<(), rustc_driver_impl[48b038e11ca70c04]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[f0a60fd3088b4ecc]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
71: 0x7ba036c944ab - std::sys::pal::unix::thread::Thread::new::thread_start::h263b7b8b08c5ad3d
72: 0x7ba030aa370a - <unknown>
73: 0x7ba030b27aac - <unknown>
74: 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 make sure that you have updated to the latest nightly
note: rustc 1.88.0-nightly (251cda5e1 2025-04-30) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z mir-opt-level=5 -Z crate-attr=feature(async_drop) -Z dump-mir-dir=dir
query stack during panic:
#0 [mir_shims] generating MIR shim for `core::future::async_drop::async_drop_in_place::{closure#0}`, instance=AsyncDropGlue(DefId(2:15313 ~ core[f0a6]::future::async_drop::async_drop_in_place::{closure#0}), Coroutine(DefId(2:15313 ~ core[f0a6]::future::async_drop::async_drop_in_place::{closure#0}), [core::pin::Pin<alloc::boxed::Box<Alias(Projection, AliasTy { args: [impl AsyncFnOnce()/#0, ()], def_id: DefId(2:3751 ~ core[f0a6]::ops::async_function::AsyncFnOnce::CallOnceFuture), .. }), alloc::alloc::Global>>, (), core::future::ResumeTy, (), (), CoroutineWitness(DefId(2:15313 ~ core[f0a6]::future::async_drop::async_drop_in_place::{closure#0}), [core::pin::Pin<alloc::boxed::Box<Alias(Projection, AliasTy { args: [impl AsyncFnOnce()/#0, ()], def_id: DefId(2:3751 ~ core[f0a6]::ops::async_function::AsyncFnOnce::CallOnceFuture), .. }), alloc::alloc::Global>>]), (*mut core::pin::Pin<alloc::boxed::Box<Alias(Projection, AliasTy { args: [impl AsyncFnOnce()/#0, ()], def_id: DefId(2:3751 ~ core[f0a6]::ops::async_function::AsyncFnOnce::CallOnceFuture), .. }), alloc::alloc::Global>>,)]))
#1 [layout_of] computing layout of `{async fn body of core::future::async_drop::async_drop_in_place<core::pin::Pin<alloc::boxed::Box<<impl AsyncFnOnce() as core::ops::async_function::AsyncFnOnce<()>>::CallOnceFuture>>>()}`
#2 [layout_of] computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body of core::future::async_drop::async_drop_in_place<core::pin::Pin<alloc::boxed::Box<<impl AsyncFnOnce() as core::ops::async_function::AsyncFnOnce<()>>::CallOnceFuture>>>()}>`
#3 [layout_of] computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body of core::future::async_drop::async_drop_in_place<core::pin::Pin<alloc::boxed::Box<<impl AsyncFnOnce() as core::ops::async_function::AsyncFnOnce<()>>::CallOnceFuture>>>()}>`
#4 [layout_of] computing layout of `core::mem::maybe_uninit::MaybeUninit<core::future::async_drop::async_drop_in_place::{opaque#0}>`
#5 [layout_of] computing layout of `{async fn body of call_once<impl AsyncFnOnce()>()}`
#6 [mir_drops_elaborated_and_const_checked] elaborating drops for `call_once`
#7 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors; 2 warnings emitted
Some errors have detailed explanations: E0601, E0670.
For more information about an error, try `rustc --explain E0601`.
@rustbot label +F-async_drop
Metadata
Metadata
Assignees
Labels
Category: This is a bug.`#![feature(async_drop)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Status: a bisection has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.This issue requires the use of incomplete features.