File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,6 @@ ipsum")]` has the same interface as the `unstable` attribute. It is used to mark
58
58
(The compiler will tell you to add the attribute if you run into this.)
59
59
- If a ` const fn ` is ` #[stable] ` but not yet intended to be const-stable.
60
60
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
-
64
61
Const-stability differs from regular stability in that it is * recursive* : a
65
62
` #[rustc_const_unstable(...)] ` function cannot even be indirectly called from stable code. This is
66
63
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.
82
79
This should also be added to lang items for which const-calls are synthesized in the compiler, to
83
80
ensure those calls do not bypass recursive const stability rules.
84
81
82
+ ## rustc_const_stable_intrinsic
83
+
85
84
On an intrinsic, this attribute marks the intrinsic as "ready to be used by public stable functions".
86
85
The ` rustc_const_unstable ` can be removed when this attribute is added.
87
86
** Adding this attribute to an intrinsic requires t-lang and wg-const-eval approval!**
You can’t perform that action at this time.
0 commit comments