Skip to content

Commit 8432f09

Browse files
committed
Add #[miri::intrinsic_fallback_is_spec] to contract_check_{ensures,requires}
See rust-lang#136578 (comment).
1 parent c61eb73 commit 8432f09

File tree

1 file changed

+2
-0
lines changed
  • library/core/src/intrinsics

1 file changed

+2
-0
lines changed

library/core/src/intrinsics/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,6 +2605,7 @@ pub const fn contract_checks() -> bool {
26052605
// doesn't honor `#[allow_internal_unstable]`, so for the const feature gate we use the user-facing
26062606
// `contracts` feature rather than the perma-unstable `contracts_internals`
26072607
#[rustc_const_unstable(feature = "contracts", issue = "128044")]
2608+
#[miri::intrinsic_fallback_is_spec]
26082609
#[lang = "contract_check_requires"]
26092610
#[rustc_intrinsic]
26102611
pub const fn contract_check_requires<C: Fn() -> bool + Copy>(cond: C) {
@@ -2632,6 +2633,7 @@ pub const fn contract_check_requires<C: Fn() -> bool + Copy>(cond: C) {
26322633
// `contracts` feature rather than the perma-unstable `contracts_internals`.
26332634
// Const-checking doesn't honor allow_internal_unstable logic used by contract expansion.
26342635
#[rustc_const_unstable(feature = "contracts", issue = "128044")]
2636+
#[miri::intrinsic_fallback_is_spec]
26352637
#[lang = "contract_check_ensures"]
26362638
#[rustc_intrinsic]
26372639
pub const fn contract_check_ensures<C: Fn(&Ret) -> bool + Copy, Ret>(cond: C, ret: Ret) -> Ret {

0 commit comments

Comments
 (0)