Skip to content

Commit 0e99d9a

Browse files
committed
Remove no longer used contract_checks intrinsic
The contract_checks compiler flag is now used to determine if runtime contract checks should be enabled, as opposed to the compiler intrinsic as previously.
1 parent ff980f2 commit 0e99d9a

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

core/src/intrinsics/mod.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,24 +2631,6 @@ pub const unsafe fn const_make_global(ptr: *mut u8) -> *const u8 {
26312631
ptr
26322632
}
26332633

2634-
/// Returns whether we should perform contract-checking at runtime.
2635-
///
2636-
/// This is meant to be similar to the ub_checks intrinsic, in terms
2637-
/// of not prematurely committing at compile-time to whether contract
2638-
/// checking is turned on, so that we can specify contracts in libstd
2639-
/// and let an end user opt into turning them on.
2640-
#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
2641-
#[rustc_const_unstable(feature = "contracts", issue = "128044")]
2642-
#[inline(always)]
2643-
#[lang = "contract_checks"]
2644-
#[rustc_intrinsic]
2645-
pub const fn contract_checks() -> bool {
2646-
// FIXME: should this be `false` or `cfg!(contract_checks)`?
2647-
2648-
// cfg!(contract_checks)
2649-
false
2650-
}
2651-
26522634
/// Check if the pre-condition `cond` has been met.
26532635
///
26542636
/// By default, if `contract_checks` is enabled, this will panic with no unwind if the condition

0 commit comments

Comments
 (0)