Skip to content

Add (const) functions on enums #65

@axelkar

Description

@axelkar

The bitflags crate define most (all?) of its functions on the struct itself, in addition to the Flags trait. Could you define the functions of Bitflag on the implementors of Bitflag, as const?

It's super useful not having to import the trait when using the bitflags crate.

I'm guessing struct BitFlags functions aren't const due to MSRV, but could there be a feature flag to make them const? Or do const functions not work at all in generic impls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions