From 544b1fc77dca92ff325edc873ee8a630ff269719 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 18 Nov 2024 18:16:00 +0100 Subject: [PATCH] update for rustc_intrinsic_const_stable_indirect (#2138) Update for rust-lang/rust#133142 --- src/stability.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stability.md b/src/stability.md index c0486938..1bfe911c 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 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 @@ -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