about summary refs log tree commit diff
path: root/compiler/rustc_data_structures
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-09-08 16:10:37 +0200
committerRalf Jung <post@ralfj.de>2025-09-10 08:40:12 +0200
commit7abbc9c8b2c638752e2a6b0913ed1e93e14d21ba (patch)
tree01f51e4f4b98d9a757fe644f97214a458d75d33f /compiler/rustc_data_structures
parent64ea775d27599a33b070dd3aa4353e1e7faee0b4 (diff)
downloadrust-7abbc9c8b2c638752e2a6b0913ed1e93e14d21ba.tar.gz
rust-7abbc9c8b2c638752e2a6b0913ed1e93e14d21ba.zip
avoid calling insert_presorted more than once
Diffstat (limited to 'compiler/rustc_data_structures')
-rw-r--r--compiler/rustc_data_structures/src/sorted_map.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/sorted_map.rs b/compiler/rustc_data_structures/src/sorted_map.rs
index c3c173b3fc4..15e3e6ea4c3 100644
--- a/compiler/rustc_data_structures/src/sorted_map.rs
+++ b/compiler/rustc_data_structures/src/sorted_map.rs
@@ -249,7 +249,7 @@ impl<K: Ord, V> SortedMap<K, V> {
             }
         };
 
-        // Insert the rest
+        // Insert the rest. This is super inefficicent since each insertion copies the entire tail.
         for (k, v) in elements {
             self.insert(k, v);
         }