Skip to content

std::collections::hash_map::{Entry, OccupiedEntry, VacantEntry} are never Send/Sync #45219

Closed
@sdleffler

Description

@sdleffler

Currently, the HashMap entry types are never Send or Sync. It seems to me that the Entry types should be Send whenever their key/value types are Send and Sync whenever their key/value types are Sync. Properly implementing Send/Sync for OccupiedEntry and VacantEntry will solve the problem for Entry as well. Is there any known reason why Entry and friends should not be Send or Sync?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API 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