-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
-Zvalidate-mirUnstable option: MIR validationUnstable option: MIR validationC-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleF-async_drop`#![feature(async_drop)]``#![feature(async_drop)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.
Description
snippet:
//@compile-flags: -Zvalidate-mir -Zinline-mir=yes
use std::mem::ManuallyDrop;
use std::{
future::{async_drop_in_place, Future},
pin::{pin, Pin},
};
fn a() {
b(bar(0))
}
async fn bar(c: usize);
fn b<d>(e: d) {
let mut f = pin!(ManuallyDrop::new(e));
let mut fut = { Pin::map_unchecked_mut(f, |g| &mut **g) };
let mut context;
let h = async_drop_in_place(fut.get_unchecked_mut());
let mut i = pin!(h);
match i.poll( context) {
j }
}
Version information
rustc 1.89.0-nightly (718ddf660 2025-05-12)
binary: rustc
commit-hash: 718ddf660e6a1802c39b4962cf7eaa4db57025ef
commit-date: 2025-05-12
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.4
Possibly related line of code:
rust/compiler/rustc_mir_transform/src/elaborate_drop.rs
Lines 1248 to 1260 in 718ddf6
ty::Array(ety, size) => { | |
let size = size.try_to_target_usize(self.tcx()); | |
self.open_drop_for_array(ty, *ety, size) | |
} | |
ty::Slice(ety) => self.drop_loop_trio_for_slice(*ety), | |
_ => span_bug!(self.source_info.span, "open drop from non-ADT `{:?}`", ty), | |
} | |
} | |
fn complete_drop(&mut self, succ: BasicBlock, unwind: Unwind) -> BasicBlock { | |
debug!("complete_drop(succ={:?}, unwind={:?})", succ, unwind); | |
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zvalidate-mir -Zinline-mir=yes
Program output
error[E0670]: `async fn` is not permitted in Rust 2015
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:9:1
|
9 | async fn bar(c: usize);
| ^^^^^ 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
error: free function without a body
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:9:1
|
9 | async fn bar(c: usize);
| ^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: provide a definition for the function: `{ <body> }`
error: `match` arm with no body
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:17:23
|
17 | j }
| ^
|
help: add a body after the pattern
|
17 | j => { todo!() } }
| ++++++++++++++
warning: type parameter `d` should have an upper camel case name
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:10:6
|
10 | fn b<d>(e: d) {
| ^ help: convert the identifier to upper camel case: `D`
|
= note: `#[warn(non_camel_case_types)]` on by default
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:18:2
|
18 | }
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs`
error[E0658]: use of unstable library feature `async_drop`
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:3:14
|
3 | future::{async_drop_in_place, Future},
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
= help: add `#![feature(async_drop)]` to the crate attributes to enable
= note: this compiler was built on 2025-05-12; consider upgrading it if it is out of date
error[E0658]: use of unstable library feature `async_drop`
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:14:13
|
14 | let h = async_drop_in_place(fut.get_unchecked_mut());
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
= help: add `#![feature(async_drop)]` to the crate attributes to enable
= note: this compiler was built on 2025-05-12; consider upgrading it if it is out of date
warning: unused variable: `j`
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:17:23
|
17 | j }
| ^ help: if this is intentional, prefix it with an underscore: `_j`
|
= note: `#[warn(unused_variables)]` on by default
error[E0133]: call to unsafe function `Pin::<&'a mut T>::map_unchecked_mut` is unsafe and requires unsafe function or block
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:12:21
|
12 | let mut fut = { Pin::map_unchecked_mut(f, |g| &mut **g) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
error[E0133]: call to unsafe function `async_drop_in_place` is unsafe and requires unsafe function or block
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:14:13
|
14 | let h = async_drop_in_place(fut.get_unchecked_mut());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
error[E0133]: call to unsafe function `Pin::<&'a mut T>::get_unchecked_mut` is unsafe and requires unsafe function or block
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:14:33
|
14 | let h = async_drop_in_place(fut.get_unchecked_mut());
| ^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
warning: variable does not need to be mutable
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:11:9
|
11 | let mut f = pin!(ManuallyDrop::new(e));
| ----^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: variable does not need to be mutable
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:12:9
|
12 | let mut fut = { Pin::map_unchecked_mut(f, |g| &mut **g) };
| ----^^^
| |
| help: remove this `mut`
warning: variable does not need to be mutable
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:15:9
|
15 | let mut i = pin!(h);
| ----^
| |
| help: remove this `mut`
error[E0381]: used binding `context` isn't initialized
--> /tmp/icemaker_global_tempdir.tcPGNTRpBJ9s/rustc_testrunner_tmpdir_reporting.XOmIYrPbp6kH/mvce.rs:16:19
|
13 | let mut context;
| ----------- binding declared here but left uninitialized
...
16 | match i.poll( context) {
| ^^^^^^^ `context` used here but it isn't initialized
|
help: consider assigning a value
|
13 | let mut context = &mut /* value */;
| ++++++++++++++++++
error: internal compiler error: compiler/rustc_mir_transform/src/elaborate_drop.rs:1254:18: open drop from non-ADT `{type error}`
--> /home/matthias/.rustup/toolchains/master/lib/rustlib/src/rust/library/core/src/future/async_drop.rs:48:70
|
48 | pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) {
| ______________________________________________________________________^
... |
51 | | }
| |_^
thread 'rustc' panicked at compiler/rustc_mir_transform/src/elaborate_drop.rs:1254:18:
Box<dyn Any>
stack backtrace:
0: 0x78a0ab959fb3 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hd03fa4624d6a43ff
1: 0x78a0ac005987 - core::fmt::write::h99c6bd700e41fe5b
2: 0x78a0ad0b4091 - std::io::Write::write_fmt::h8fdba04fd8ac1437
3: 0x78a0ab959e12 - std::sys::backtrace::BacktraceLock::print::ha37796b30caa3dee
4: 0x78a0ab95da0a - std::panicking::default_hook::{{closure}}::h2be5a8e7cd709dcc
5: 0x78a0ab95d58f - std::panicking::default_hook::h652a4375123f2a56
6: 0x78a0aa98c873 - std[56b07bdfd6b41829]::panicking::update_hook::<alloc[763664f815bf0fa8]::boxed::Box<rustc_driver_impl[fb64ae308f02562]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x78a0ab95e283 - std::panicking::rust_panic_with_hook::h4f131a958fbdba61
8: 0x78a0aa9c85f1 - std[56b07bdfd6b41829]::panicking::begin_panic::<rustc_errors[b8a92ed9b61c1989]::ExplicitBug>::{closure#0}
9: 0x78a0aa9bc626 - std[56b07bdfd6b41829]::sys::backtrace::__rust_end_short_backtrace::<std[56b07bdfd6b41829]::panicking::begin_panic<rustc_errors[b8a92ed9b61c1989]::ExplicitBug>::{closure#0}, !>
10: 0x78a0aa9b8ce9 - std[56b07bdfd6b41829]::panicking::begin_panic::<rustc_errors[b8a92ed9b61c1989]::ExplicitBug>
11: 0x78a0aa9d2c71 - <rustc_errors[b8a92ed9b61c1989]::diagnostic::BugAbort as rustc_errors[b8a92ed9b61c1989]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
12: 0x78a0aafa0adc - <rustc_errors[b8a92ed9b61c1989]::DiagCtxtHandle>::span_bug::<rustc_span[d026ac1b2b8daa7c]::span_encoding::Span, alloc[763664f815bf0fa8]::string::String>
13: 0x78a0ab03ecb7 - rustc_middle[60b471758888797e]::util::bug::opt_span_bug_fmt::<rustc_span[d026ac1b2b8daa7c]::span_encoding::Span>::{closure#0}
14: 0x78a0ab01723a - rustc_middle[60b471758888797e]::ty::context::tls::with_opt::<rustc_middle[60b471758888797e]::util::bug::opt_span_bug_fmt<rustc_span[d026ac1b2b8daa7c]::span_encoding::Span>::{closure#0}, !>::{closure#0}
15: 0x78a0ab0170ab - rustc_middle[60b471758888797e]::ty::context::tls::with_context_opt::<rustc_middle[60b471758888797e]::ty::context::tls::with_opt<rustc_middle[60b471758888797e]::util::bug::opt_span_bug_fmt<rustc_span[d026ac1b2b8daa7c]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
16: 0x78a0a93f14c7 - rustc_middle[60b471758888797e]::util::bug::span_bug_fmt::<rustc_span[d026ac1b2b8daa7c]::span_encoding::Span>
17: 0x78a0ac897c24 - <rustc_mir_transform[4a4e9cf23a9606fd]::elaborate_drop::DropCtxt<rustc_mir_transform[4a4e9cf23a9606fd]::shim::DropShimElaborator>>::elaborate_drop
18: 0x78a0ac891851 - rustc_mir_transform[4a4e9cf23a9606fd]::shim::make_shim
19: 0x78a0ac88f82f - rustc_query_impl[cf6f12f07b5d9141]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_shims::dynamic_query::{closure#2}::{closure#0}, rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 8usize]>>
20: 0x78a0ac88f7e3 - <rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_shims::dynamic_query::{closure#2} as core[604f71d46da0bdba]::ops::function::FnOnce<(rustc_middle[60b471758888797e]::ty::context::TyCtxt, rustc_middle[60b471758888797e]::ty::instance::InstanceKind)>>::call_once
21: 0x78a0ac852d8c - rustc_query_system[620f1d082c8e701b]::query::plumbing::try_execute_query::<rustc_query_impl[cf6f12f07b5d9141]::DynamicConfig<rustc_query_system[620f1d082c8e701b]::query::caches::DefaultCache<rustc_middle[60b471758888797e]::ty::instance::InstanceKind, rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[cf6f12f07b5d9141]::plumbing::QueryCtxt, false>
22: 0x78a0ac852aaa - rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_shims::get_query_non_incr::__rust_end_short_backtrace
23: 0x78a0ac84d95e - <rustc_middle[60b471758888797e]::ty::context::TyCtxt>::instance_mir
24: 0x78a0aca7a70f - rustc_mir_transform[4a4e9cf23a9606fd]::inline::cycle::mir_inliner_callees
25: 0x78a0aca7a574 - rustc_query_impl[cf6f12f07b5d9141]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_inliner_callees::dynamic_query::{closure#2}::{closure#0}, rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 16usize]>>
26: 0x78a0aca7a543 - <rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_inliner_callees::dynamic_query::{closure#2} as core[604f71d46da0bdba]::ops::function::FnOnce<(rustc_middle[60b471758888797e]::ty::context::TyCtxt, rustc_middle[60b471758888797e]::ty::instance::InstanceKind)>>::call_once
27: 0x78a0ac853a47 - rustc_query_system[620f1d082c8e701b]::query::plumbing::try_execute_query::<rustc_query_impl[cf6f12f07b5d9141]::DynamicConfig<rustc_query_system[620f1d082c8e701b]::query::caches::DefaultCache<rustc_middle[60b471758888797e]::ty::instance::InstanceKind, rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[cf6f12f07b5d9141]::plumbing::QueryCtxt, false>
28: 0x78a0ac85373b - rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_inliner_callees::get_query_non_incr::__rust_end_short_backtrace
29: 0x78a0acff4d76 - rustc_mir_transform[4a4e9cf23a9606fd]::inline::cycle::mir_callgraph_reachable::process
30: 0x78a0acff519f - rustc_mir_transform[4a4e9cf23a9606fd]::inline::cycle::mir_callgraph_reachable::process
31: 0x78a0acff4544 - rustc_mir_transform[4a4e9cf23a9606fd]::inline::cycle::mir_callgraph_reachable
32: 0x78a0acff4369 - rustc_query_impl[cf6f12f07b5d9141]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_callgraph_reachable::dynamic_query::{closure#2}::{closure#0}, rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 1usize]>>
33: 0x78a0acff4339 - <rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_callgraph_reachable::dynamic_query::{closure#2} as core[604f71d46da0bdba]::ops::function::FnOnce<(rustc_middle[60b471758888797e]::ty::context::TyCtxt, (rustc_middle[60b471758888797e]::ty::instance::Instance, rustc_span[d026ac1b2b8daa7c]::def_id::LocalDefId))>>::call_once
34: 0x78a0ac851dac - rustc_query_system[620f1d082c8e701b]::query::plumbing::try_execute_query::<rustc_query_impl[cf6f12f07b5d9141]::DynamicConfig<rustc_query_system[620f1d082c8e701b]::query::caches::DefaultCache<(rustc_middle[60b471758888797e]::ty::instance::Instance, rustc_span[d026ac1b2b8daa7c]::def_id::LocalDefId), rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[cf6f12f07b5d9141]::plumbing::QueryCtxt, false>
35: 0x78a0ac851aa8 - rustc_query_impl[cf6f12f07b5d9141]::query_impl::mir_callgraph_reachable::get_query_non_incr::__rust_end_short_backtrace
36: 0x78a0ac8a2a7b - rustc_mir_transform[4a4e9cf23a9606fd]::inline::process_blocks::<rustc_mir_transform[4a4e9cf23a9606fd]::inline::NormalInliner>
37: 0x78a0ac8cd31a - <rustc_mir_transform[4a4e9cf23a9606fd]::inline::Inline as rustc_mir_transform[4a4e9cf23a9606fd]::pass_manager::MirPass>::run_pass
38: 0x78a0ac00383d - rustc_mir_transform[4a4e9cf23a9606fd]::pass_manager::run_passes_inner
39: 0x78a0aca7da03 - rustc_mir_transform[4a4e9cf23a9606fd]::run_optimization_passes
40: 0x78a0aca7b2fb - rustc_mir_transform[4a4e9cf23a9606fd]::optimized_mir
41: 0x78a0aca7ae9d - rustc_query_impl[cf6f12f07b5d9141]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cf6f12f07b5d9141]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 8usize]>>
42: 0x78a0ac450e3f - rustc_query_system[620f1d082c8e701b]::query::plumbing::try_execute_query::<rustc_query_impl[cf6f12f07b5d9141]::DynamicConfig<rustc_query_system[620f1d082c8e701b]::query::caches::DefIdCache<rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[cf6f12f07b5d9141]::plumbing::QueryCtxt, false>
43: 0x78a0ac450262 - rustc_query_impl[cf6f12f07b5d9141]::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
44: 0x78a0ac84d286 - <rustc_middle[60b471758888797e]::ty::context::TyCtxt>::instance_mir
45: 0x78a0ac4b585f - rustc_interface[52ab4bdc9c3114ed]::passes::run_required_analyses
46: 0x78a0acfbb49e - rustc_interface[52ab4bdc9c3114ed]::passes::analysis
47: 0x78a0acfbb475 - rustc_query_impl[cf6f12f07b5d9141]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cf6f12f07b5d9141]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 0usize]>>
48: 0x78a0acf2cdba - rustc_query_system[620f1d082c8e701b]::query::plumbing::try_execute_query::<rustc_query_impl[cf6f12f07b5d9141]::DynamicConfig<rustc_query_system[620f1d082c8e701b]::query::caches::SingleCache<rustc_middle[60b471758888797e]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[cf6f12f07b5d9141]::plumbing::QueryCtxt, false>
49: 0x78a0acf2ca8f - rustc_query_impl[cf6f12f07b5d9141]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
50: 0x78a0ad1fdc07 - rustc_interface[52ab4bdc9c3114ed]::passes::create_and_enter_global_ctxt::<core[604f71d46da0bdba]::option::Option<rustc_interface[52ab4bdc9c3114ed]::queries::Linker>, rustc_driver_impl[fb64ae308f02562]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
51: 0x78a0ad0f9fe6 - rustc_interface[52ab4bdc9c3114ed]::interface::run_compiler::<(), rustc_driver_impl[fb64ae308f02562]::run_compiler::{closure#0}>::{closure#1}
52: 0x78a0ad0aacfe - std[56b07bdfd6b41829]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[52ab4bdc9c3114ed]::util::run_in_thread_with_globals<rustc_interface[52ab4bdc9c3114ed]::util::run_in_thread_pool_with_globals<rustc_interface[52ab4bdc9c3114ed]::interface::run_compiler<(), rustc_driver_impl[fb64ae308f02562]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
53: 0x78a0ad0ab16b - <<std[56b07bdfd6b41829]::thread::Builder>::spawn_unchecked_<rustc_interface[52ab4bdc9c3114ed]::util::run_in_thread_with_globals<rustc_interface[52ab4bdc9c3114ed]::util::run_in_thread_pool_with_globals<rustc_interface[52ab4bdc9c3114ed]::interface::run_compiler<(), rustc_driver_impl[fb64ae308f02562]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[604f71d46da0bdba]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
54: 0x78a0ad0ac56b - std::sys::pal::unix::thread::Thread::new::thread_start::he52776061f67c85f
55: 0x78a0a6ea370a - <unknown>
56: 0x78a0a6f27aac - <unknown>
57: 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.89.0-nightly (718ddf660 2025-05-12) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z validate-mir -Z inline-mir=yes -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:15267 ~ core[604f]::future::async_drop::async_drop_in_place::{closure#0}), Coroutine(DefId(2:15267 ~ core[604f]::future::async_drop::async_drop_in_place::{closure#0}), [{type error}, (), core::future::ResumeTy, (), (), CoroutineWitness(DefId(2:15267 ~ core[604f]::future::async_drop::async_drop_in_place::{closure#0}), [{type error}]), (*mut {type error},)]))
#1 [mir_inliner_callees] computing all local function calls in `core::future::async_drop::async_drop_in_place::{closure#0}`
#2 [mir_callgraph_reachable] computing if `b::<{type error}>` (transitively) calls `a`
#3 [optimized_mir] optimizing MIR for `a`
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 11 previous errors; 5 warnings emitted
Some errors have detailed explanations: E0133, E0381, E0601, E0658, E0670.
For more information about an error, try `rustc --explain E0133`.
Metadata
Metadata
Assignees
Labels
-Zvalidate-mirUnstable option: MIR validationUnstable option: MIR validationC-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleF-async_drop`#![feature(async_drop)]``#![feature(async_drop)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
moxian commentedon May 12, 2025
bisects to #123948
the example in OP looks rather noisy, with extra errors that don't need to be there. Would be nice to minimize and cleanup a bit further.
@rustbot label: +F-async_drop +-Zvalidate-mir +E-needs-mcve +S-has-bisection +requires-incomplete-features -needs-triage
rustbot commentedon May 12, 2025
Unknown labels: F-async-drop, -Z-validate-mir
theemathas commentedon May 12, 2025
Minimized:
Error output
Async drop poll shim for error dropee generates noop body (fixes rust…
azhogin commentedon May 13, 2025
Fix: #140967
open drop from non-ADT
withunsafe_binder
#141394Async drop poll shim for error dropee generates noop body (fixes rust…
Rollup merge of rust-lang#140967 - azhogin:azhogin/async-drop-poll-sh…
Rollup merge of rust-lang#140967 - azhogin:azhogin/async-drop-poll-sh…
Rollup merge of #140967 - azhogin:azhogin/async-drop-poll-shim-for-er…