diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-25 06:50:55 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-26 12:05:57 +1100 |
| commit | e3ef2ff05fc8e99f9a187e788713c65486f04d16 (patch) | |
| tree | 5c5555ee3e0b33d27d6b7ec62ebe7c7e1a013695 | |
| parent | 3d12160dfcb4d95cd3f1eaa23071fb9b4e3d69ab (diff) | |
| download | rust-e3ef2ff05fc8e99f9a187e788713c65486f04d16.tar.gz rust-e3ef2ff05fc8e99f9a187e788713c65486f04d16.zip | |
Streamline a `BitSet` creation.
| -rw-r--r-- | compiler/rustc_mir_transform/src/coroutine.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine.rs b/compiler/rustc_mir_transform/src/coroutine.rs index f262912fab1..7fbb5d70d66 100644 --- a/compiler/rustc_mir_transform/src/coroutine.rs +++ b/compiler/rustc_mir_transform/src/coroutine.rs @@ -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. |
