Skip to content

Commit

Permalink
Fix ptr::hash, just hash the raw pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Dec 4, 2018
1 parent 6fab3f9 commit ad76569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad76569

Please sign in to comment.