-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Treat const fn like fn for promotion. #75586
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, ...)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, ...)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.
rust-lang/const-eval#19 gives many arguments for why we should not promote
const fncalls. However, we currently do promoteconst fncalls inconst fn, even though that has all the same problems. This fails to compile, but really we shouldn't make this a hard error:This does not just apply to
const fncalls; all promotion insideconst fnshould be treated like insidefn.Cc @rust-lang/wg-const-eval