Skip to content

Commit 7154860

Browse files
Explain why we remove self from storage live locals
1 parent 02c65e1 commit 7154860

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_mir/transform/generator.rs

+1
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ fn locals_live_across_suspend_points(
504504
storage_live.seek_before(loc);
505505
let mut storage_liveness = storage_live.get().clone();
506506

507+
// Later passes handle the generator's `self` argument separately.
507508
storage_liveness.remove(SELF_ARG);
508509

509510
// Store the storage liveness for later use so we can restore the state

0 commit comments

Comments
 (0)