Skip to content

Explicitly callout usage of bracket notation for item access in HashMap docs #52575

Closed
@bpicolo

Description

@bpicolo

Not a huge Rust user (Rust enthusiast!), but wasn't aware that square-bracket notation functioned for HashMaps. I see now that it's due to operator overloading via the Index interface, but newcomers to the language likely aren't going to be familiar with that.

Probably worth making it obvious that it's doable in the HashMap documentation? This example is currently the only place it shows up, somewhat sneakily

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions