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.
This commit is contained in:
commit
7c83737b44
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user