Skip to content

Clean up "const_hack" PRs now that const if/match exists #67627

Closed
@oli-obk

Description

@oli-obk

Before we had branches in const fn we added a few hacks to some functions by rewriting them in unreadable ways or removing assertions. We should undo all these hacks. The list of PRs with const hacks is https://github.com/rust-lang/rust/issues?q=label%3Aconst-hack+is%3Aclosed

Most of the time you'll want to revert the diff to the body of any const fn but not undo any other changes that these PRs made. Then you'll need to add allow_internal_unstable attributes for the const_if feature gate (or whatever other feature gates the compiler tells you to add) in case the const fn is already stable.

This issue has been assigned to @jumbatm via this comment.

Metadata

Metadata

Assignees

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions