-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Function pointers break in const code after ~const bounds are added #109543
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
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, ...)C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I first noticed this in #109122 (review), but there are also existing regressions from other
~constadditions. For example:I expected to see this happen: compiles fine.
Instead, this happened: errors that
~const FnOnceis not implemented for theI32Cmpfunction pointer.Details
Version it worked on
For that particular example, it most recently worked on: 1.65.0
Version with regression
After #102245 reached stable,
rustc --version --verbose:... but I don't mean to pick on that particular PR -- I think there's a more general problem with
~consthere.@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged