about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-12-15 10:17:35 +0100
committerGitHub <noreply@github.com>2018-12-15 10:17:35 +0100
commit7c83737b44478ed6d55c574be3c6cc6283463047 (patch)
tree4d506111ba6756d4662742b911c87ace0cc680b6
parent3a9fa9b66a787bef6928af7bb38b3693306979d8 (diff)
parent8a6ca24bcb1264e7c41ff54d92d9e7dc0a07076f (diff)
downloadrust-7c83737b44478ed6d55c574be3c6cc6283463047.tar.gz
rust-7c83737b44478ed6d55c574be3c6cc6283463047.zip
Rollup merge of #56751 - mbrubeck:hash, r=dtolnay
Allow ptr::hash to accept fat pointers

Fat pointers implement Hash since #45483.  This is a follow-up to #56250.
-rw-r--r--src/libcore/ptr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index f61e582f764..79ca600b4a5 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -2544,7 +2544,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: *const T, into: &mut S) {
+pub fn hash<T: ?Sized, S: hash::Hasher>(hashee: *const T, into: &mut S) {
     use hash::Hash;
     hashee.hash(into);
 }