Skip to content

Commit 51a17aa

Browse files
committed
Streamline a BitSet creation.
1 parent de5fbd0 commit 51a17aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_mir_transform/src/coroutine.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,7 @@ fn locals_live_across_suspend_points<'tcx>(
697697
let loc = Location { block, statement_index: data.statements.len() };
698698

699699
liveness.seek_to_block_end(block);
700-
let mut live_locals: BitSet<_> = BitSet::new_empty(body.local_decls.len());
701-
live_locals.union(liveness.get());
700+
let mut live_locals = liveness.get().clone();
702701

703702
if !movable {
704703
// The `liveness` variable contains the liveness of MIR locals ignoring borrows.

0 commit comments

Comments
 (0)