about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2025-05-04 19:14:35 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2025-05-04 19:14:35 +0200
commit9f8c6d57bf2fd56d11b4f15d1951c2deb40bf369 (patch)
tree4dfbf4f6be8ba68372ae15514e9876e10a404f06 /compiler
parent6a48217efc1e5874eda45ac7a1af6c3a12fe7d72 (diff)
downloadrust-9f8c6d57bf2fd56d11b4f15d1951c2deb40bf369.tar.gz
rust-9f8c6d57bf2fd56d11b4f15d1951c2deb40bf369.zip
Add comment on creation of `SyntheticCoroutineBody`
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_mir_transform/src/coroutine/by_move_body.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs b/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
index bbc4531789b..0a839d91404 100644
--- a/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
+++ b/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
@@ -214,6 +214,8 @@ pub(crate) fn coroutine_by_move_body_def_id<'tcx>(
     let mut by_move_body = body.clone();
     MakeByMoveBody { tcx, field_remapping, by_move_coroutine_ty }.visit_body(&mut by_move_body);
 
+    // This path is unique since we're in a query so we'll only be called once with `parent_def_id`
+    // and this is the only location creating `SyntheticCoroutineBody`.
     let body_def = tcx.create_def(
         parent_def_id,
         None,