Skip to content

Commit

Permalink
Rollup merge of rust-lang#56751 - mbrubeck:hash, r=dtolnay
Browse files Browse the repository at this point in the history
Allow ptr::hash to accept fat pointers

Fat pointers implement Hash since rust-lang#45483.  This is a follow-up to rust-lang#56250.
  • Loading branch information
kennytm authored Dec 14, 2018
2 parents b8fda9f + 8a6ca24 commit 3b0d7da
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 3b0d7da

Please sign in to comment.