Rollup merge of #122739 - Sky9x:insert-put, r=jhpratt

Add "put" as a confusable for insert on hash map/set

Already a confusable on btree map/set.

Java's `Map` calls the insert method `put`: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html#put(K,V)
This commit is contained in:
Matthias Krüger 2024-03-20 05:51:24 +01:00 committed by GitHub
commit d7209bf858
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1101,7 +1101,7 @@ where
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_confusables("push", "append")]
#[rustc_confusables("push", "append", "put")]
pub fn insert(&mut self, k: K, v: V) -> Option<V> {
self.base.insert(k, v)
}

View File

@ -885,7 +885,7 @@ where
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_confusables("push", "append")]
#[rustc_confusables("push", "append", "put")]
pub fn insert(&mut self, value: T) -> bool {
self.base.insert(value)
}