Remove repr-lookup attempt in derive
expansion
#24320
Labels
C-bug
Category: This is a bug.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Spawned off of #24270, in particular this discussion: #24270 (diff)
The new code for
deriving(PartialOrd)
attempts to look up if there is arepr
attribute on theenum
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 au64
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).
The text was updated successfully, but these errors were encountered: