Rollup merge of #59603 - matklad:ptrhash, r=Centril

stabilize ptr::hash

closes #56286
This commit is contained in:
Mazdak Farrokhzad 2019-04-01 17:29:59 +02:00 committed by GitHub
commit e9b9f33ecc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2561,7 +2561,6 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
/// # Examples
///
/// ```
/// #![feature(ptr_hash)]
/// use std::collections::hash_map::DefaultHasher;
/// use std::hash::{Hash, Hasher};
/// use std::ptr;
@ -2579,7 +2578,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
///
/// assert_eq!(actual, expected);
/// ```
#[unstable(feature = "ptr_hash", reason = "newly added", issue = "56286")]
#[stable(feature = "ptr_hash", since = "1.35.0")]
pub fn hash<T: ?Sized, S: hash::Hasher>(hashee: *const T, into: &mut S) {
use hash::Hash;
hashee.hash(into);