Skip to content

Commit 19f225f

Browse files
committed
clarify the role of rustc_const_unstable
1 parent cd7f600 commit 19f225f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/stability.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ marks an item as stabilized. Note that stable functions may use unstable things
4949

5050
## rustc_const_unstable
5151

52-
The `#[rustc_const_unstable(feature = "foo", issue = "1234", reason = "lorem ipsum")]`
53-
has the same interface as the `unstable` attribute. It is used to mark
54-
`const fn` as having their constness be unstable. This allows you to make a
55-
function stable without stabilizing its constness or even just marking an existing
56-
stable function as `const fn` without instantly stabilizing the `const fn`ness.
52+
The `#[rustc_const_unstable(feature = "foo", issue = "1234", reason = "lorem
53+
ipsum")]` has the same interface as the `unstable` attribute. It is used to mark
54+
`const fn` as having their constness be unstable. Every `const fn` with
55+
stability attributes should carry either this attribute or
56+
`#[rustc_const_stable]` (see below).
5757

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

0 commit comments

Comments
 (0)