Skip to content

discriminant_value intrinsic -- tracking issue for 639 #24263

Description

@nikomatsakis

Tracking issue for rust-lang/rfcs#639.

Some things to nail down before stabilization:

  • prototype implementation
  • signature needs to have a <T:Reflect> bound
  • documentation should reflect the inherent instability in this value and describe valid uses
  • perhaps signature should require input T to actually be an enum instance?
  • do we want to adjust the return type in any way to enforce the above rules?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCP-mediumMedium priorityT-langRelevant to the language teamT-libs-api[DEPRECATED; DO NOT USE]final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions