Uh oh!
There was an error while loading. Please reload this page.
Introduce ptr::hash for references - #56250
Conversation
rust-highfive
commented
Nov 26, 2018
r? @aidanhs (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Centril
commented
Nov 27, 2018
Code looks good imo; assigning over to someone on T-libs for review. r? @sfackler |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
dwijnand
commented
Dec 1, 2018
CC @alexcrichton this would've made that interning code in Cargo look more symmetric :) |
alexcrichton
commented
Dec 3, 2018
This seems like it's fine to me to add, but to align with |
My hesitation on a raw pointer was to avoid having to make a decision on whether a null pointer should be hashed or not. But I guess if |
rust-highfive
commented
Dec 4, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Introduce ptr::hash for references The RHS is what I used, which wasn't as convenient as `ptr::eq`, so I wondered: should `ptr::hash` exist? My first Rust PR, so I'm going to need some guidance. :)
Introduce ptr::hash for references The RHS is what I used, which wasn't as convenient as `ptr::eq`, so I wondered: should `ptr::hash` exist? My first Rust PR, so I'm going to need some guidance. :)
| a == b | ||
| } | ||
| /// Hash the raw pointer address behind a reference, rather than the value |
There was a problem hiding this comment.
As now it's taking a pointer, "behind a reference" may need to be removed.
bors
commented
Dec 6, 2018
Introduce ptr::hash for references The RHS is what I used, which wasn't as convenient as `ptr::eq`, so I wondered: should `ptr::hash` exist? My first Rust PR, so I'm going to need some guidance. :)
bors
commented
Dec 6, 2018
💔 Test failed - status-travis |
rust-highfive
commented
Dec 6, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
kennytm
commented
Dec 6, 2018
@bors retry rollup travis-ci/travis-ci#9696 |
Introduce ptr::hash for references The RHS is what I used, which wasn't as convenient as `ptr::eq`, so I wondered: should `ptr::hash` exist? My first Rust PR, so I'm going to need some guidance. :)
Rollup of 7 pull requests Successful merges: - #56000 (Add Armv8-M Mainline targets) - #56250 (Introduce ptr::hash for references) - #56434 (Improve query cycle errors for parallel queries) - #56516 (Replace usages of `..i + 1` ranges with `..=i`.) - #56555 (Send textual profile data to stderr, not stdout) - #56561 (Fix bug in from_key_hashed_nocheck) - #56574 (Fix a stutter in the docs for slice::exact_chunks) Failed merges: r? @ghost
dwijnand
commented
Dec 7, 2018
@sinkuu you're right, well spotted. But I'm holding back on pushing a commit as I don't want to mess up any rollup efforts. I'm happy to push a fix either in this PR or a follow-up when it's best to. |
dwijnand
commented
Dec 7, 2018
Followed up in #56602. |
Fix the just-introduced ptr::hash docs Follow-up to rust-lang#56250.
Allow ptr::hash to accept fat pointers Fat pointers implement Hash since rust-lang#45483. This is a follow-up to rust-lang#56250.
Allow ptr::hash to accept fat pointers Fat pointers implement Hash since rust-lang#45483. This is a follow-up to rust-lang#56250.
Allow ptr::hash to accept fat pointers Fat pointers implement Hash since rust-lang#45483. This is a follow-up to rust-lang#56250.
Allow ptr::hash to accept fat pointers Fat pointers implement Hash since rust-lang#45483. This is a follow-up to rust-lang#56250.
The RHS is what I used, which wasn't as convenient as
ptr::eq, so I wondered: shouldptr::hashexist?My first Rust PR, so I'm going to need some guidance. :)