Skip to content

Commit c2cd2e8

Browse files
Remove coroutine info when building coroutine drop body
1 parent cd6d8f2 commit c2cd2e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_mir_transform/src/coroutine.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ fn create_coroutine_drop_shim<'tcx>(
12311231
drop_clean: BasicBlock,
12321232
) -> Body<'tcx> {
12331233
let mut body = body.clone();
1234+
let _ = body.coroutine.take();
12341235
body.arg_count = 1; // make sure the resume argument is not included here
12351236

12361237
let source_info = SourceInfo::outermost(body.span);

0 commit comments

Comments
 (0)