-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
"discriminant_value" intrinsic returns u64, cannot fit all discriminants #70509
Copy link
Copy link
Closed
Labels
A-intrinsicsArea: IntrinsicsArea: IntrinsicsC-bugCategory: This is a bug.Category: This is a bug.T-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.T-langRelevant to the language teamRelevant to the language teamT-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
A-intrinsicsArea: IntrinsicsArea: IntrinsicsC-bugCategory: This is a bug.Category: This is a bug.T-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.T-langRelevant to the language teamRelevant to the language teamT-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.
Ever since we had enums with
repr(u128)/repr(i128), the type of thediscriminant_valueintrinsic was no longer adequate: it returns au64, which simply cannot fit all discriminant values.@eddyb says the type of the intrinsic should be adjusted. This will affect both its codegen and Miri implementation.
This issue has been assigned to @lcnr via this comment.