Skip to content

Commit 63d2819

Browse files
committed
Add tracking issue and rename to hash_one
1 parent a3eb9e3 commit 63d2819

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

library/core/src/hash/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ pub trait BuildHasher {
496496
/// # Example
497497
///
498498
/// ```
499-
/// #![feature(build_hasher_simple_hash_of)]
499+
/// #![feature(build_hasher_simple_hash_one)]
500500
///
501501
/// use std::cmp::{max, min};
502502
/// use std::hash::{BuildHasher, Hash, Hasher};
@@ -511,16 +511,16 @@ pub trait BuildHasher {
511511
/// // Then later, in a `#[test]` for the type...
512512
/// let bh = std::collections::hash_map::RandomState::new();
513513
/// assert_eq!(
514-
/// bh.hash_of(OrderAmbivalentPair(1, 2)),
515-
/// bh.hash_of(OrderAmbivalentPair(2, 1))
514+
/// bh.hash_one(OrderAmbivalentPair(1, 2)),
515+
/// bh.hash_one(OrderAmbivalentPair(2, 1))
516516
/// );
517517
/// assert_eq!(
518-
/// bh.hash_of(OrderAmbivalentPair(10, 2)),
519-
/// bh.hash_of(&OrderAmbivalentPair(2, 10))
518+
/// bh.hash_one(OrderAmbivalentPair(10, 2)),
519+
/// bh.hash_one(&OrderAmbivalentPair(2, 10))
520520
/// );
521521
/// ```
522-
#[unstable(feature = "build_hasher_simple_hash_of", issue = "88888888")]
523-
fn hash_of<T: Hash>(&self, x: T) -> u64 {
522+
#[unstable(feature = "build_hasher_simple_hash_one", issue = "86161")]
523+
fn hash_one<T: Hash>(&self, x: T) -> u64 {
524524
let mut hasher = self.build_hasher();
525525
x.hash(&mut hasher);
526526
hasher.finish()

0 commit comments

Comments
 (0)