Skip to content

String slices as the keys of sendable maps bring about pain #3284

Closed

Description

As far as I can see it, the region and slice systems make it impossible to use a send_map<&str,V>, unless you're only comparing static strings. The problem, as far as I can see it, is that find() wants to take its argument by reference, so the region checker requires invariance somehow and borrow check errors happen.

@nikomatsakis, thoughts? Maybe we need a separate StringMap type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-lifetimesArea: Lifetimes / regions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions