]> git.lizzy.rs Git - rust.git/commitdiff
Fix the just-introduced ptr::hash docs
authorDale Wijnand <dale.wijnand@gmail.com>
Fri, 7 Dec 2018 16:33:32 +0000 (17:33 +0100)
committerDale Wijnand <dale.wijnand@gmail.com>
Fri, 7 Dec 2018 16:33:32 +0000 (17:33 +0100)
src/libcore/ptr.rs

index 8630dd402ef68043a34ec9523de66007296ba3fc..69854c5a5d964db093b275c6958121f8a0c8244f 100644 (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
 ///