Make ptr::hash take a raw painter like ptr::eq

This commit is contained in:
Dale Wijnand 2018-12-04 07:48:20 +00:00
parent 097b5db5f6
commit 6fab3f9c69
No known key found for this signature in database
GPG key ID: 4F256E3D151DF5EF

View file

@ -2534,7 +2534,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")]
pub fn hash<T, S: hash::Hasher>(hashee: &T, into: &mut S) {
pub fn hash<T, S: hash::Hasher>(hashee: *const T, into: &mut S) {
use hash::Hash;
NonNull::from(hashee).hash(into)
}