Skip to content

Commit 9532ff1

Browse files
authored
update const stability docs (rust-lang#2111)
1 parent 6ef78e3 commit 9532ff1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/stability.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ ipsum")]` has the same interface as the `unstable` attribute. It is used to mark
5858
(The compiler will tell you to add the attribute if you run into this.)
5959
- If a `const fn` is `#[stable]` but not yet intended to be const-stable.
6060

61-
Furthermore, this attribute is needed to mark an intrinsic as an *unstable* `const fn`, because
62-
there's no way to add `const` to functions in `extern` blocks for now.
63-
6461
Const-stability differs from regular stability in that it is *recursive*: a
6562
`#[rustc_const_unstable(...)]` function cannot even be indirectly called from stable code. This is
6663
to avoid accidentally leaking unstable compiler implementation artifacts to stable code or locking
@@ -82,6 +79,8 @@ compiler features); the only reason it is not const-stable yet are API concerns.
8279
This should also be added to lang items for which const-calls are synthesized in the compiler, to
8380
ensure those calls do not bypass recursive const stability rules.
8481

82+
## rustc_const_stable_intrinsic
83+
8584
On an intrinsic, this attribute marks the intrinsic as "ready to be used by public stable functions".
8685
The `rustc_const_unstable` can be removed when this attribute is added.
8786
**Adding this attribute to an intrinsic requires t-lang and wg-const-eval approval!**

0 commit comments

Comments
 (0)