Skip to content

Commit

Permalink
Rollup merge of rust-lang#56602 - dwijnand:fix-ptr-hash-docs, r=Centril
Browse files Browse the repository at this point in the history
Fix the just-introduced ptr::hash docs

Follow-up to rust-lang#56250.
  • Loading branch information
Centril committed Dec 8, 2018
2 parents eb30d56 + ba3db7b commit 7f076fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libcore/ptr.rs
Expand Up @@ -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 coerces to `*const T` implicitly)
/// by its address rather than the value it points to
/// (which is what the `Hash for &T` implementation does).
///
/// # Examples
///
Expand Down

0 comments on commit 7f076fa

Please sign in to comment.