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.
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_unstableattributes for theconst_iffeature 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.