Skip to content

Commit

Permalink
clarify the role of rustc_const_unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 22, 2024
1 parent cd7f600 commit e3f3291
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stability.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ marks an item as stabilized. Note that stable functions may use unstable things

The `#[rustc_const_unstable(feature = "foo", issue = "1234", reason = "lorem ipsum")]`
has the same interface as the `unstable` attribute. It is used to mark
`const fn` as having their constness be unstable. This allows you to make a
function stable without stabilizing its constness or even just marking an existing
stable function as `const fn` without instantly stabilizing the `const fn`ness.
`const fn` as having their constness be unstable. Every function that is eventually intended
to become const-stable should carry this attribute, no matter whether it is `#[stable]`
or `#[unstable]`.

Furthermore this attribute is needed to mark an intrinsic as `const fn`, because
there's no way to add `const` to functions in `extern` blocks for now.
Expand Down

0 comments on commit e3f3291

Please sign in to comment.