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

This commit is contained in:
Sky 2024-03-19 14:28:01 -04:00
parent a385e5667c
commit 49dd50f880
No known key found for this signature in database
GPG Key ID: EED1A7AF86ACBCEF
2 changed files with 2 additions and 2 deletions

View File

@ -1101,7 +1101,7 @@ pub fn get_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<&mut V>
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")] #[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> { pub fn insert(&mut self, k: K, v: V) -> Option<V> {
self.base.insert(k, v) self.base.insert(k, v)
} }

View File

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