Skip to content

Document Self::Variant for enums #1253

Closed
rust-lang/rust
#64580
@adamchalmers

Description

@adamchalmers

In Rust 1.37 you can use type aliases for enums. I think it's worth showing people how that works in the page on Enums.

In my code, I only ever use this feature when I want to refer to an enum by Self instead of by its name (usually if the name is very long). I'm planning to use that as my example and link to the release notes/RFC if readers want more info.

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