about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorCelina G. Val <celinval@amazon.com>2025-01-30 17:06:09 -0800
committerCelina G. Val <celinval@amazon.com>2025-02-03 13:55:15 -0800
commitddbf54b67d9befcf1fb90613d2a6f7f6aa03141e (patch)
tree1d4338ad613cc7b04680f8ed361c4920e1b4ae71 /library/core/src
parent2c4923e6bc9608557f0bc59f975006e590fd337d (diff)
downloadrust-ddbf54b67d9befcf1fb90613d2a6f7f6aa03141e.tar.gz
rust-ddbf54b67d9befcf1fb90613d2a6f7f6aa03141e.zip
Rename rustc_contract to contract
This has now been approved as a language feature and no longer needs
a `rustc_` prefix.

Also change the `contracts` feature to be marked as incomplete and
`contracts_internals` as internal.
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/contracts.rs2
-rw-r--r--library/core/src/intrinsics/mod.rs8
-rw-r--r--library/core/src/lib.rs2
-rw-r--r--library/core/src/macros/mod.rs8
4 files changed, 10 insertions, 10 deletions
diff --git a/library/core/src/contracts.rs b/library/core/src/contracts.rs
index 0668cacb92c..c769e219e4d 100644
--- a/library/core/src/contracts.rs
+++ b/library/core/src/contracts.rs
@@ -6,7 +6,7 @@ pub use crate::macros::builtin::{contracts_ensures as ensures, contracts_require
 /// Emitted by rustc as a desugaring of `#[ensures(PRED)] fn foo() -> R { ... [return R;] ... }`
 /// into: `fn foo() { let _check = build_check_ensures(|ret| PRED) ... [return _check(R);] ... }`
 /// (including the implicit return of the tail expression, if any).
-#[unstable(feature = "rustc_contracts_internals", issue = "133866" /* compiler-team#759 */)]
+#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
 #[lang = "contract_build_check_ensures"]
 #[track_caller]
 pub fn build_check_ensures<Ret, C>(cond: C) -> impl (Fn(Ret) -> Ret) + Copy
diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs
index 14f8645d6f1..1e4dc12f9b6 100644
--- a/library/core/src/intrinsics/mod.rs
+++ b/library/core/src/intrinsics/mod.rs
@@ -4051,8 +4051,8 @@ pub const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize)
 /// checking is turned on, so that we can specify contracts in libstd
 /// and let an end user opt into turning them on.
 #[cfg(not(bootstrap))]
-#[rustc_const_unstable(feature = "rustc_contracts_internals", issue = "133866" /* compiler-team#759 */)]
-#[unstable(feature = "rustc_contracts_internals", issue = "133866" /* compiler-team#759 */)]
+#[rustc_const_unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
+#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
 #[inline(always)]
 #[rustc_intrinsic]
 pub const fn contract_checks() -> bool {
@@ -4067,7 +4067,7 @@ pub const fn contract_checks() -> bool {
 /// By default, if `contract_checks` is enabled, this will panic with no unwind if the condition
 /// returns false.
 #[cfg(not(bootstrap))]
-#[unstable(feature = "rustc_contracts_internals", issue = "133866" /* compiler-team#759 */)]
+#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
 #[lang = "contract_check_requires"]
 #[rustc_intrinsic]
 pub fn contract_check_requires<C: Fn() -> bool>(cond: C) {
@@ -4082,7 +4082,7 @@ pub fn contract_check_requires<C: Fn() -> bool>(cond: C) {
 /// By default, if `contract_checks` is enabled, this will panic with no unwind if the condition
 /// returns false.
 #[cfg(not(bootstrap))]
-#[unstable(feature = "rustc_contracts_internals", issue = "133866" /* compiler-team#759 */)]
+#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
 #[rustc_intrinsic]
 pub fn contract_check_ensures<'a, Ret, C: Fn(&'a Ret) -> bool>(ret: &'a Ret, cond: C) {
     if contract_checks() && !cond(ret) {
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index 6a0051244f0..de8e85f7b36 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -248,7 +248,7 @@ pub mod autodiff {
 }
 
 #[cfg(not(bootstrap))]
-#[unstable(feature = "rustc_contracts", issue = "133866")]
+#[unstable(feature = "contracts", issue = "128044")]
 pub mod contracts;
 
 #[unstable(feature = "cfg_match", issue = "115585")]
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index cb37530e90d..4c6fd196bd3 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -1783,8 +1783,8 @@ pub(crate) mod builtin {
     /// eventually parsed as a unary closure expression that is
     /// invoked on a reference to the return value.
     #[cfg(not(bootstrap))]
-    #[unstable(feature = "rustc_contracts", issue = "133866")]
-    #[allow_internal_unstable(rustc_contracts_internals)]
+    #[unstable(feature = "contracts", issue = "128044")]
+    #[allow_internal_unstable(contracts_internals)]
     #[rustc_builtin_macro]
     pub macro contracts_ensures($item:item) {
         /* compiler built-in */
@@ -1796,8 +1796,8 @@ pub(crate) mod builtin {
     /// eventually parsed as an boolean expression with access to the
     /// function's formal parameters
     #[cfg(not(bootstrap))]
-    #[unstable(feature = "rustc_contracts", issue = "133866")]
-    #[allow_internal_unstable(rustc_contracts_internals)]
+    #[unstable(feature = "contracts", issue = "128044")]
+    #[allow_internal_unstable(contracts_internals)]
     #[rustc_builtin_macro]
     pub macro contracts_requires($item:item) {
         /* compiler built-in */