Skip to content

Commit

Permalink
Auto merge of #111934 - scottmcm:stabilize-hash-one, r=Amanieu
Browse files Browse the repository at this point in the history
Stabilize `BuildHasher::hash_one`

FCP completed in #86161 (comment)
  • Loading branch information
bors committed May 27, 2023
2 parents a525c7d + ba5a396 commit 786178b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2662,7 +2662,6 @@ impl<T: Clone, A: Allocator + Clone> Clone for Vec<T, A> {
/// as required by the `core::borrow::Borrow` implementation.
///
/// ```
/// #![feature(build_hasher_simple_hash_one)]
/// use std::hash::BuildHasher;
///
/// let b = std::collections::hash_map::RandomState::new();
Expand Down
1 change: 0 additions & 1 deletion library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ impl<'a, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut [T; N] {
/// as required by the `Borrow` implementation.
///
/// ```
/// #![feature(build_hasher_simple_hash_one)]
/// use std::hash::BuildHasher;
///
/// let b = std::collections::hash_map::RandomState::new();
Expand Down
4 changes: 1 addition & 3 deletions library/core/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,6 @@ pub trait BuildHasher {
/// # Example
///
/// ```
/// #![feature(build_hasher_simple_hash_one)]
///
/// use std::cmp::{max, min};
/// use std::hash::{BuildHasher, Hash, Hasher};
/// struct OrderAmbivalentPair<T: Ord>(T, T);
Expand All @@ -697,7 +695,7 @@ pub trait BuildHasher {
/// bh.hash_one(&OrderAmbivalentPair(2, 10))
/// );
/// ```
#[unstable(feature = "build_hasher_simple_hash_one", issue = "86161")]
#[stable(feature = "build_hasher_simple_hash_one", since = "CURRENT_RUSTC_VERSION")]
fn hash_one<T: Hash>(&self, x: T) -> u64
where
Self: Sized,
Expand Down

0 comments on commit 786178b

Please sign in to comment.