Streamline a BitSet creation.

This commit is contained in:
Nicholas Nethercote 2024-11-25 06:50:55 +11:00
parent 3d12160dfc
commit e3ef2ff05f

View file

@ -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.