From a8653b49183e4d84a43e9f2c910619e0ea408955 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 18 Nov 2024 08:00:05 +0100 Subject: [PATCH 1/2] update for rustc_intrinsic_const_stable_indirect --- src/stability.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stability.md b/src/stability.md index c04869387..82ccd4a46 100644 --- a/src/stability.md +++ b/src/stability.md @@ -57,6 +57,7 @@ ipsum")]` has the same interface as the `unstable` attribute. It is used to mark - If a `const fn` makes use of unstable language features or intrinsics. (The compiler will tell you to add the attribute if you run into this.) - If a `const fn` is `#[stable]` but not yet intended to be const-stable. +- To change the feature get that is required to call a const-unstable intrinsic. Const-stability differs from regular stability in that it is *recursive*: a `#[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. This should also be added to lang items for which const-calls are synthesized in the compiler, to ensure those calls do not bypass recursive const stability rules. -## rustc_const_stable_intrinsic +## rustc_intrinsic_const_stable_indirect On an intrinsic, this attribute marks the intrinsic as "ready to be used by public stable functions". -The `rustc_const_unstable` can be removed when this attribute is added. +If the intrinsic has a `rustc_const_unstable` attribute, it should be removed. **Adding this attribute to an intrinsic requires t-lang and wg-const-eval approval!** ## rustc_default_body_unstable From 4d52d3a17cff95c52482489da00a7eeefb36ceaf Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 18 Nov 2024 16:27:24 +0100 Subject: [PATCH 2/2] typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bennet Bleßmann --- src/stability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stability.md b/src/stability.md index 82ccd4a46..1bfe911c9 100644 --- a/src/stability.md +++ b/src/stability.md @@ -57,7 +57,7 @@ ipsum")]` has the same interface as the `unstable` attribute. It is used to mark - If a `const fn` makes use of unstable language features or intrinsics. (The compiler will tell you to add the attribute if you run into this.) - If a `const fn` is `#[stable]` but not yet intended to be const-stable. -- To change the feature get that is required to call a const-unstable intrinsic. +- To change the feature gate that is required to call a const-unstable intrinsic. Const-stability differs from regular stability in that it is *recursive*: a `#[rustc_const_unstable(...)]` function cannot even be indirectly called from stable code. This is