]> git.lizzy.rs Git - rust.git/commitdiff
Fix ptr::hash, just hash the raw pointer
authorDale Wijnand <dale.wijnand@gmail.com>
Tue, 4 Dec 2018 08:06:26 +0000 (08:06 +0000)
committerDale Wijnand <dale.wijnand@gmail.com>
Tue, 4 Dec 2018 08:06:26 +0000 (08:06 +0000)
src/libcore/ptr.rs

index 606dd765ce1d2e246baa73d40480bbdfa694ac16..4be89180d677dc2c02b5f0a8185d5db2551db990 100644 (file)
@@ -2536,7 +2536,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
 #[unstable(feature = "ptr_hash", reason = "newly added", issue = "56286")]
 pub fn hash<T, S: hash::Hasher>(hashee: *const T, into: &mut S) {
     use hash::Hash;
-    NonNull::from(hashee).hash(into)
+    hashee.hash(into);
 }
 
 // Impls for function pointers