Skip to content

Commit

Permalink
Add "put" as a confusable for insert on hash map/set
Browse files Browse the repository at this point in the history
  • Loading branch information
Sky9x committed Mar 19, 2024
1 parent a385e56 commit 49dd50f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/std/src/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/collections/hash/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 49dd50f

Please sign in to comment.