1
Fork 0

Pick a better variable name for ptr::hash

This commit is contained in:
Dale Wijnand 2018-11-27 16:33:01 +00:00
parent 7b429b0440
commit 81251491dd
No known key found for this signature in database
GPG key ID: 4F256E3D151DF5EF

View file

@ -2527,9 +2527,9 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
/// println!("Hash is {:x}!", hasher.finish());
/// ```
#[unstable(feature = "ptr_hash", reason = "newly added", issue = "56285")]
pub fn hash<T, S: hash::Hasher>(a: &T, into: &mut S) {
pub fn hash<T, S: hash::Hasher>(hashee: &T, into: &mut S) {
use hash::Hash;
NonNull::from(a).hash(into)
NonNull::from(hashee).hash(into)
}
// Impls for function pointers