8000 Syntax extension for converting enums to/from integers · Issue #3868 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content
Syntax extension for converting enums to/from integers #3868
@erickt

Description

@erickt

Converting an enum to and from an integer is repetitive and brittle. So instead we should add the traits ToInt/FromInt/ToUint/FromUint, and add a syntax extension to automatically generate implementations of those traits for a given enum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0