-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Spawned off of #24270, in particular this discussion: #24270 (diff)
The new code for deriving(PartialOrd) attempts to look up if there is a repr attribute on the enum that is driving the deriving expansion, because we need (at least) to incorporate knowledge of whether the discriminant is meant to be interpreted as a signed integer or an unsigned one (since the current intrinsic always returns a u64 today).
However, the look up may be fragile, since @sfackler points out that a later pass of expansion could add the repr that we are seeking.
There are a number of different ways to solve this problem (see the linked discussion for some of them).
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.