Skip to content

Commit 9f8c6d5

Browse files
committed
Add comment on creation of SyntheticCoroutineBody
1 parent 6a48217 commit 9f8c6d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_mir_transform/src/coroutine/by_move_body.rs

+2
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ pub(crate) fn coroutine_by_move_body_def_id<'tcx>(
214214
let mut by_move_body = body.clone();
215215
MakeByMoveBody { tcx, field_remapping, by_move_coroutine_ty }.visit_body(&mut by_move_body);
216216

217+
// This path is unique since we're in a query so we'll only be called once with `parent_def_id`
218+
// and this is the only location creating `SyntheticCoroutineBody`.
217219
let body_def = tcx.create_def(
218220
parent_def_id,
219221
None,

0 commit comments

Comments
 (0)