Skip to content

Commit 7c83737

Browse files
authored
Rollup merge of rust-lang#56751 - mbrubeck:hash, r=dtolnay
Allow ptr::hash to accept fat pointers Fat pointers implement Hash since rust-lang#45483. This is a follow-up to rust-lang#56250.
2 parents 3a9fa9b + 8a6ca24 commit 7c83737

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
@@ -2544,7 +2544,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
25442544
/// assert_eq!(actual, expected);
25452545
/// ```
25462546
#[unstable(feature = "ptr_hash", reason = "newly added", issue = "56286")]
2547-
pub fn hash<T, S: hash::Hasher>(hashee: *const T, into: &mut S) {
2547+
pub fn hash<T: ?Sized, S: hash::Hasher>(hashee: *const T, into: &mut S) {
25482548
use hash::Hash;
25492549
hashee.hash(into);
25502550
}

0 commit comments

Comments
 (0)