Skip to content

Allow for representing Option<uint> as an integer with an excluded sentinel value #14369

@zwarich

Description

@zwarich

We should have some way of using Option<uint> (or a moral equivalent) for integers with an excluded sentinel value, e.g. MovePathIndex in librustc. It's frustrating that Option isn't actually a zero-cost abstraction, forcing you to fall back to manually checking sentinel values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions