Skip to content

Commit 2af5f22

Browse files
committed
Merge CGUs in a nicer way.
1 parent e414d25 commit 2af5f22

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/rustc_monomorphize/src/partitioning.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,7 @@ fn merge_codegen_units<'tcx>(
340340

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

347345
// Record that `second_smallest` now contains all the stuff that was
348346
// in `smallest` before.

0 commit comments

Comments
 (0)