Skip to content

Commit

Permalink
Allow ptr::hash to accept fat pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Dec 12, 2018
1 parent bd47d68 commit 8a6ca24
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 @@ -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);
}
Expand Down

0 comments on commit 8a6ca24

Please sign in to comment.