-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Description
CTFE error reporting code is quite complex, and some of the logic is repeated in many places -- e.g. the fact that we do not report hard errors for evaluation failures in promoteds. We should try to centralize that logic (and with rust-lang/const-eval#53 we can hopefully get rid of some of it eventually).
Cases I know of:
- This here might or might not still be needed but at least the "promoteds only get lints" logic" can hopefully be deduplicated and all the error-reporting logic also moved to
librustc_mir::const_eval
. - Codegen also does CTFE error reporting (with yet another copy of the "promoted" logic) that should be handled through
librustc_mir::const_eval::error
.
Cc @rust-lang/wg-const-eval
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-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.