Skip to content

Commit

Permalink
Streamline a BitSet creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Nov 26, 2024
1 parent 3d12160 commit e3ef2ff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_mir_transform/src/coroutine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,7 @@ fn locals_live_across_suspend_points<'tcx>(
let loc = Location { block, statement_index: data.statements.len() };

liveness.seek_to_block_end(block);
let mut live_locals: BitSet<_> = BitSet::new_empty(body.local_decls.len());
live_locals.union(liveness.get());
let mut live_locals = liveness.get().clone();

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

0 comments on commit e3ef2ff

Please sign in to comment.