Skip to content

Outdated comment about std::hash::DefaultHasher being inaccessible #134717

Open
@dbdr

Description

Location

//! Although its items are public and contain stability attributes, they can't actually be accessed
//! outside this crate.

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::hash::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::hash::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.

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions