diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2024-12-03 16:13:00 +0000 |
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2025-02-03 13:55:15 -0800 |
| commit | 6a6c6b891bb0350b3f16abd3e84ff12dbd1b4c5b (patch) | |
| tree | 8e16cd67997426132fcfa3a0877a8e7d829f124c /library/core/src/contracts.rs | |
| parent | b279ff9dcfadcdb6976097d58044d151af81cf51 (diff) | |
| download | rust-6a6c6b891bb0350b3f16abd3e84ff12dbd1b4c5b.tar.gz rust-6a6c6b891bb0350b3f16abd3e84ff12dbd1b4c5b.zip | |
Separate contract feature gates for the internal machinery
The extended syntax for function signature that includes contract clauses should never be user exposed versus the interface we want to ship externally eventually.
Diffstat (limited to 'library/core/src/contracts.rs')
| -rw-r--r-- | library/core/src/contracts.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/contracts.rs b/library/core/src/contracts.rs index 3efd2df0a38..b155dbc213e 100644 --- a/library/core/src/contracts.rs +++ b/library/core/src/contracts.rs @@ -8,7 +8,7 @@ pub use crate::macros::builtin::contracts_requires as requires; /// Emitted by rustc as a desugaring of `#[requires(PRED)] fn foo(x: X) { ... }` /// into: `fn foo(x: X) { check_requires(|| PRED) ... }` #[cfg(not(bootstrap))] -#[unstable(feature = "rustc_contracts", issue = "none" /* compiler-team#759 */)] +#[unstable(feature = "rustc_contracts_internals", issue = "133866" /* compiler-team#759 */)] #[lang = "contract_check_requires"] #[track_caller] pub fn check_requires<C: FnOnce() -> bool>(c: C) { @@ -21,7 +21,7 @@ pub fn check_requires<C: FnOnce() -> bool>(c: C) { /// into: `fn foo() { let _check = build_check_ensures(|ret| PRED) ... [return _check(R);] ... }` /// (including the implicit return of the tail expression, if any). #[cfg(not(bootstrap))] -#[unstable(feature = "rustc_contracts", issue = "none" /* compiler-team#759 */)] +#[unstable(feature = "rustc_contracts_internals", issue = "133866" /* compiler-team#759 */)] #[lang = "contract_build_check_ensures"] #[track_caller] pub fn build_check_ensures<Ret, C>(c: C) -> impl (FnOnce(Ret) -> Ret) + Copy |
