From 7abbc9c8b2c638752e2a6b0913ed1e93e14d21ba Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 8 Sep 2025 16:10:37 +0200 Subject: avoid calling insert_presorted more than once --- compiler/rustc_data_structures/src/sorted_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src') 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 SortedMap { } }; - // 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); } -- cgit 1.4.1-3-g733a5