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:
commit
d7209bf858
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user