Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f2b2800

Browse files
update for rustc_intrinsic_const_stable_indirect (#2138)
Update for rust-lang/rust#133142
1 parent b679e71 commit f2b2800

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/stability.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ ipsum")]` has the same interface as the `unstable` attribute. It is used to mark
5757
- If a `const fn` makes use of unstable language features or intrinsics.
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.
60+
- To change the feature gate that is required to call a const-unstable intrinsic.
6061

6162
Const-stability differs from regular stability in that it is *recursive*: a
6263
`#[rustc_const_unstable(...)]` function cannot even be indirectly called from stable code. This is
@@ -79,10 +80,10 @@ compiler features); the only reason it is not const-stable yet are API concerns.
7980
This should also be added to lang items for which const-calls are synthesized in the compiler, to
8081
ensure those calls do not bypass recursive const stability rules.
8182

82-
## rustc_const_stable_intrinsic
83+
## rustc_intrinsic_const_stable_indirect
8384

8485
On an intrinsic, this attribute marks the intrinsic as "ready to be used by public stable functions".
85-
The `rustc_const_unstable` can be removed when this attribute is added.
86+
If the intrinsic has a `rustc_const_unstable`attribute, it should be removed.
8687
**Adding this attribute to an intrinsic requires t-lang and wg-const-eval approval!**
8788

8889
## rustc_default_body_unstable

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /