Closed
Description
Right now:
- if you have an unstable const function and you stabilize it, you automatically stabilize the constness, too.
- if you have a stable non-const function, adding
const
to it will automatically stabilize the constness - You can opt-out of the stability of the constness of a function via
rustc_const_unstable
What's missing is the ability to explicitly mark the constness as stable, just like we have an explicit scheme to mark items as stable. This would prevent accidental stablization of any constness. Not that any has happened so far, but #58750 (comment) made me realize that it's not always easy to gauge the stability of constness.
It might also be helpful if documentation showed since when the constness has been stabilized.
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Area: `#[stable]`, `#[unstable]` etc.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.