-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Derive Hash for ThreadId + better example #41008
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Looks like the doctests are failing:
Could you add |
Note that there is already a |
Oh, that's weird. I have no problem with a derived implementation that actually shows the value. |
I think we originally did not derive |
Yeah hiding the value from the |
it is irritating but also useless - you can always just transmute |
You monster! |
@rfcbot fcp merge |
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams:
No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I don't remember why I tagged this |
@frewsxcv Perhaps because the example code is updated for the |
@rfcbot reviewed |
@bors: r+ |
📌 Commit cd14a32 has been approved by |
Derive Hash for ThreadId + better example Derive `Hash` for `ThreadId` (see comments in rust-lang#21507). Useful for making maps based on thread, e.g. `HashMap<ThreadId, ?>`. Also update example code for thread IDs to be more useful.
Derive Hash for ThreadId + better example Derive `Hash` for `ThreadId` (see comments in rust-lang#21507). Useful for making maps based on thread, e.g. `HashMap<ThreadId, ?>`. Also update example code for thread IDs to be more useful.
⌛ Testing commit cd14a32 with merge d62179c... |
💔 Test failed - status-appveyor |
⌛ Testing commit cd14a32 with merge 4a78fc0... |
💔 Test failed - status-appveyor |
Derive Hash for ThreadId + better example Derive `Hash` for `ThreadId` (see comments in #21507). Useful for making maps based on thread, e.g. `HashMap<ThreadId, ?>`. Also update example code for thread IDs to be more useful.
☀️ Test successful - status-appveyor, status-travis |
Derive
Hash
forThreadId
(see comments in #21507). Useful for making maps based on thread, e.g.HashMap<ThreadId, ?>
. Also update example code for thread IDs to be more useful.