diff options
| author | Matt Brubeck <mbrubeck@limpet.net> | 2018-12-12 09:41:03 -0800 |
|---|---|---|
| committer | Matt Brubeck <mbrubeck@limpet.net> | 2018-12-12 09:41:03 -0800 |
| commit | 8a6ca24bcb1264e7c41ff54d92d9e7dc0a07076f (patch) | |
| tree | 82301864782b92b3d8a16c0c84b7683412fec28a | |
| parent | bd47d6825bf4090517549d33cfef10d3300b4a75 (diff) | |
| download | rust-8a6ca24bcb1264e7c41ff54d92d9e7dc0a07076f.tar.gz rust-8a6ca24bcb1264e7c41ff54d92d9e7dc0a07076f.zip | |
Allow ptr::hash to accept fat pointers
| -rw-r--r-- | src/libcore/ptr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index b11ae303272..adcd0f2e7c6 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2544,7 +2544,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool { /// assert_eq!(actual, expected); /// ``` #[unstable(feature = "ptr_hash", reason = "newly added", issue = "56286")] -pub fn hash<T, S: hash::Hasher>(hashee: *const T, into: &mut S) { +pub fn hash<T: ?Sized, S: hash::Hasher>(hashee: *const T, into: &mut S) { use hash::Hash; hashee.hash(into); } |
