Skip to content

Commit

Permalink
Merge CGUs in a nicer way.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Jun 15, 2023
1 parent e414d25 commit 2af5f22
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_monomorphize/src/partitioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,7 @@ fn merge_codegen_units<'tcx>(

// Move the mono-items from `smallest` to `second_smallest`
second_smallest.modify_size_estimate(smallest.size_estimate());
for (k, v) in smallest.items_mut().drain() {
second_smallest.items_mut().insert(k, v);
}
second_smallest.items_mut().extend(smallest.items_mut().drain());

// Record that `second_smallest` now contains all the stuff that was
// in `smallest` before.
Expand Down

0 comments on commit 2af5f22

Please sign in to comment.