From 1ac066ef047fcead574876b04f86a684b8362c58 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Fri, 7 Dec 2018 17:33:32 +0100 Subject: [PATCH 1/2] Fix the just-introduced ptr::hash docs --- src/libcore/ptr.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 8630dd402ef68..69854c5a5d964 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2516,8 +2516,11 @@ pub fn eq(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 /// From ba3db7b03a9b4016d9bada0dc7f1696dfc3b0d30 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Fri, 7 Dec 2018 17:34:53 +0100 Subject: [PATCH 2/2] grammar --- src/libcore/ptr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 69854c5a5d964..452f10bfbb624 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2518,7 +2518,7 @@ pub fn eq(a: *const T, b: *const T) -> bool { /// Hash a raw pointer. /// -/// This can be used to hash a `&T` reference (which coerce to `*const T` implicitly) +/// This can be used to hash a `&T` reference (which coerces to `*const T` implicitly) /// by its address rather than the value it points to /// (which is what the `Hash for &T` implementation does). ///