Skip to content

Commit ff09981

Browse files
authored
Unrolled build for rust-lang#139307
Rollup merge of rust-lang#139307 - xizheyin:issue-139296, r=joboet std: Add performance warnings to HashMap::get_disjoint_mut Closes rust-lang#139296 The `get_disjoint_mut` in `HashMap` also performs a complexity O(n^2) check. So we need to be reminded of that as well. https://github.com/rust-lang/hashbrown/blob/b5b0655a37e156f9798ac8dd7e970d4adba9bf90/src/raw/mod.rs#L1216-L1220
2 parents 7f69523 + 16381b3 commit ff09981

File tree

1 file changed

+3
-0
lines changed
  • library/std/src/collections/hash

1 file changed

+3
-0
lines changed

library/std/src/collections/hash/map.rs

+3
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,9 @@ where
973973
/// Returns an array of length `N` with the results of each query. For soundness, at most one
974974
/// mutable reference will be returned to any value. `None` will be used if the key is missing.
975975
///
976+
/// This method performs a check to ensure there are no duplicate keys, which currently has a time-complexity of O(n^2),
977+
/// so be careful when passing many keys.
978+
///
976979
/// # Panics
977980
///
978981
/// Panics if any keys are overlapping.

0 commit comments

Comments
 (0)