Skip to content

Commit 6fab3f9

Browse files
committed
Make ptr::hash take a raw painter like ptr::eq
1 parent 097b5db commit 6fab3f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2534,7 +2534,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
25342534
/// assert_eq!(actual, expected);
25352535
/// ```
25362536
#[unstable(feature = "ptr_hash", reason = "newly added", issue = "56286")]
2537-
pub fn hash<T, S: hash::Hasher>(hashee: &T, into: &mut S) {
2537+
pub fn hash<T, S: hash::Hasher>(hashee: *const T, into: &mut S) {
25382538
use hash::Hash;
25392539
NonNull::from(hashee).hash(into)
25402540
}

0 commit comments

Comments
 (0)