about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2024-08-13 16:16:57 -0700
committerJosh Stone <jistone@redhat.com>2024-08-13 16:16:57 -0700
commitce67e68cce3f4582db48b86c51a35c76d1103654 (patch)
treedbb12f34ee1804492b7ca746a3f6ee0f7c887d13 /compiler/rustc_monomorphize
parent0a34ce49ceab68a75dd34f1e76555396a8b5b2c8 (diff)
downloadrust-ce67e68cce3f4582db48b86c51a35c76d1103654.tar.gz
rust-ce67e68cce3f4582db48b86c51a35c76d1103654.zip
Update `indexmap` and use `IndexMap::append`
Diffstat (limited to 'compiler/rustc_monomorphize')
-rw-r--r--compiler/rustc_monomorphize/src/partitioning.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/partitioning.rs b/compiler/rustc_monomorphize/src/partitioning.rs
index 65a3d8d1742..92902185e8b 100644
--- a/compiler/rustc_monomorphize/src/partitioning.rs
+++ b/compiler/rustc_monomorphize/src/partitioning.rs
@@ -371,7 +371,7 @@ fn merge_codegen_units<'tcx>(
         // Move the items from `cgu_src` to `cgu_dst`. Some of them may be
         // duplicate inlined items, in which case the destination CGU is
         // unaffected. Recalculate size estimates afterwards.
-        cgu_dst.items_mut().extend(cgu_src.items_mut().drain(..));
+        cgu_dst.items_mut().append(cgu_src.items_mut());
         cgu_dst.compute_size_estimate();
 
         // Record that `cgu_dst` now contains all the stuff that was in
@@ -410,7 +410,7 @@ fn merge_codegen_units<'tcx>(
         // Move the items from `smallest` to `second_smallest`. Some of them
         // may be duplicate inlined items, in which case the destination CGU is
         // unaffected. Recalculate size estimates afterwards.
-        second_smallest.items_mut().extend(smallest.items_mut().drain(..));
+        second_smallest.items_mut().append(smallest.items_mut());
         second_smallest.compute_size_estimate();
 
         // Don't update `cgu_contents`, that's only for incremental builds.