Outdated comment about std::hash::DefaultHasher being inaccessible
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location
Summary
This comment in library/std/src/hash/random.rs says
Although its items are public and contain stability attributes, they can't actually be accessed outside this crate.
However, std:#️⃣:DefaultHasher and RandomState are accessible since version 1.76 (feature = "std_hash_exports"). The comment predates that, so I suppose it's outdated and should be reworded or removed to avoid confusion.
Somewhat related: https://doc.rust-lang.org/std/index.html?search=DefaultHasher only shows std::collections::hash_map::DefaultHasher, while presumably it should also show std:#️⃣:DefaultHasher. Please let me know if there's a better way to report that one, as I'm not sure what the best venue would be.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at library/std/src/hash/random.rs#L5-L6 and compare the comment with the issue's note that std:#️⃣:DefaultHasher and RandomState are accessible since Rust 1.76. Update or remove the outdated wording, then separately check whether the reported std documentation search result needs a follow-up issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100