-
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
Remove outdated comment about std::hash::DefaultHasher being inaccessible #135735
base: master
Are you sure you want to change the base?
Conversation
…eing inaccessible Fixes rust-lang#134717 (confirmed by @hkBst)
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ibraheemdev (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
@@ -2,9 +2,6 @@ | |||
//! [`collections`] module without actually publicly exporting them, so that parts of that | |||
//! implementation can more easily be moved to the [`alloc`] crate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this comment is outdated too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. So should this entire module be unmoduled and inlined into another file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just inline this into https://github.com/rust-lang/rust/blob/master/library/std/src/hash/mod.rs without mod wrapper?
//! Although its items are public and contain stability attributes, they can't actually be accessed | ||
//! outside this crate. | ||
//! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking a closer look, I think the comments are actually correct. This module was added in #115694 for the reasons the comment mentions. I think we can confusion by mentioning that the types are re-exported elsewhere.
- //! Although its items are public and contain stability attributes, they can't actually be accessed
- //! outside this crate.
+ //! Although its items are public and contain stability attributes, they can't actually be accessed
+ //! through this module, and are instead re-exported from `std::hash` and `std::collections::hash_map`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this comment is more confusing than enlightening, and best removed. It's a crate-private module with exports through https://github.com/rust-lang/rust/blob/master/library/std/src/hash/mod.rs.
Fixes #134717 (confirmed by @hkBst)