1
Fork 0

Fix the just-introduced ptr::hash docs

This commit is contained in:
Dale Wijnand 2018-12-07 17:33:32 +01:00
parent f504d3f059
commit 1ac066ef04
No known key found for this signature in database
GPG key ID: 4F256E3D151DF5EF

View file

@ -2516,8 +2516,11 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
a == b
}
/// Hash the raw pointer address behind a reference, rather than the value
/// it points to.
/// Hash a raw pointer.
///
/// This can be used to hash a `&T` reference (which coerce to `*const T` implicitly)
/// by its address rather than the value it points to
/// (which is what the `Hash for &T` implementation does).
///
/// # Examples
///