Make ptr::hash take a raw painter like ptr::eq
This commit is contained in:
parent
097b5db5f6
commit
6fab3f9c69
1 changed files with 1 additions and 1 deletions
|
|
@ -2534,7 +2534,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: &T, into: &mut S) {
|
||||
pub fn hash<T, S: hash::Hasher>(hashee: *const T, into: &mut S) {
|
||||
use hash::Hash;
|
||||
NonNull::from(hashee).hash(into)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue