Skip to content

Rollup of 6 pull requests #56623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the just-introduced ptr::hash docs
  • Loading branch information
dwijnand committed Dec 7, 2018
commit 1ac066ef047fcead574876b04f86a684b8362c58
7 changes: 5 additions & 2 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
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 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
///
Expand Down