Skip to content
Closed
Changes from all commits
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
3 changes: 0 additions & 3 deletions library/std/src/hash/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

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.
//!
Comment on lines -5 to -7
Copy link
Member

@ibraheemdev ibraheemdev Jan 31, 2025

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`.

Copy link
Member

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.

//! [`collections`]: crate::collections

#[allow(deprecated)]
Expand Down
Loading