Skip to content

Commit c151ffe

Browse files
committed
Subpart9 for async drop (major3) - elaborate_drops changes
1 parent 59b9945 commit c151ffe

File tree

5 files changed

+467
-73
lines changed

5 files changed

+467
-73
lines changed

compiler/rustc_mir_transform/src/coroutine.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,13 @@ fn elaborate_coroutine_drops<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
10711071
// coroutine's resume function.
10721072
let typing_env = body.typing_env(tcx);
10731073

1074-
let mut elaborator = DropShimElaborator { body, patch: MirPatch::new(body), tcx, typing_env };
1074+
let mut elaborator = DropShimElaborator {
1075+
body,
1076+
patch: MirPatch::new(body),
1077+
tcx,
1078+
typing_env,
1079+
produce_async_drops: false,
1080+
};
10751081

10761082
for (block, block_data) in body.basic_blocks.iter_enumerated() {
10771083
let (target, unwind, source_info) = match block_data.terminator() {
@@ -1108,6 +1114,7 @@ fn elaborate_coroutine_drops<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
11081114
*target,
11091115
unwind,
11101116
block,
1117+
None,
11111118
);
11121119
}
11131120
elaborator.patch.apply(body);

0 commit comments

Comments
 (0)