Skip to content

Commit 8a6ca24

Browse files
committed
Allow ptr::hash to accept fat pointers
1 parent bd47d68 commit 8a6ca24

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)