Auto merge of #111934 - scottmcm:stabilize-hash-one, r=Amanieu

Stabilize `BuildHasher::hash_one`

FCP completed in https://github.com/rust-lang/rust/issues/86161#issuecomment-1561125732
This commit is contained in:
bors 2023-05-27 09:47:42 +00:00
commit 786178b2ab
3 changed files with 1 additions and 5 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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);
@ -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,