-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for enum_as_repr #86772
Copy link
Copy link
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(enum_as_repr)]This is a tracking issue for traits to convert primitive enums into their repr (
core::enums::AsRepr), and attempt to convert reprs into primitive enums (core::enums::FromRepr).AsRepris automatically implemented for all relevant enum types, as well asstd::mem::Discriminant, andFromReprmay be derived.Public API
Steps / History
Unresolved Questions
FromReprforDiscriminant<T>? We want to consider carefully if that impl would have unwanted semver implications.