AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added.
This commit is contained in:
@@ -565,7 +565,11 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
|
||||
| TerminatorKind::CoroutineDrop => {
|
||||
bug!("shouldn't exist at codegen {:?}", bb_data.terminator());
|
||||
}
|
||||
TerminatorKind::Drop { place, target, unwind: _, replace: _ } => {
|
||||
TerminatorKind::Drop { place, target, unwind: _, replace: _, drop, async_fut } => {
|
||||
assert!(
|
||||
async_fut.is_none() && drop.is_none(),
|
||||
"Async Drop must be expanded or reset to sync before codegen"
|
||||
);
|
||||
let drop_place = codegen_place(fx, *place);
|
||||
crate::abi::codegen_drop(fx, source_info, drop_place, *target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user