-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Evaluating constants in MIR optimizations introduces const eval errors #122828
Copy link
Copy link
Open
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-mir-optArea: MIR optimizationsArea: MIR optimizationsA-monomorphizationArea: MonomorphizationArea: MonomorphizationC-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.
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-mir-optArea: MIR optimizationsArea: MIR optimizationsA-monomorphizationArea: MonomorphizationArea: MonomorphizationC-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This compiles fine in debug builds, but fails in release builds:
Based on #107503 (comment) cc @RalfJung.
But also see this example based on type sizes.