Skip to content

Commit 1ac066e

Browse files
committed
Fix the just-introduced ptr::hash docs
1 parent f504d3f commit 1ac066e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/libcore/ptr.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,8 +2516,11 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
25162516
a == b
25172517
}
25182518

2519-
/// Hash the raw pointer address behind a reference, rather than the value
2520-
/// it points to.
2519+
/// Hash a raw pointer.
2520+
///
2521+
/// This can be used to hash a `&T` reference (which coerce to `*const T` implicitly)
2522+
/// by its address rather than the value it points to
2523+
/// (which is what the `Hash for &T` implementation does).
25212524
///
25222525
/// # Examples
25232526
///

0 commit comments

Comments
 (0)