Skip to content

Commit ad76569

Browse files
committed
Fix ptr::hash, just hash the raw pointer
1 parent 6fab3f9 commit ad76569

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
@@ -2536,7 +2536,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
25362536
#[unstable(feature = "ptr_hash", reason = "newly added", issue = "56286")]
25372537
pub fn hash<T, S: hash::Hasher>(hashee: *const T, into: &mut S) {
25382538
use hash::Hash;
2539-
NonNull::from(hashee).hash(into)
2539+
hashee.hash(into);
25402540
}
25412541

25422542
// Impls for function pointers

0 commit comments

Comments
 (0)