Skip to content

Commit 03c571f

Browse files
committed
Add #[miri::intrinsic_fallback_is_spec] to contract_check_{ensures,requires}
See #136578 (comment).
1 parent 26c88e3 commit 03c571f

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
@@ -2647,6 +2647,7 @@ pub const unsafe fn const_make_global(ptr: *mut u8) -> *const u8 {
26472647
// doesn't honor `#[allow_internal_unstable]`, so for the const feature gate we use the user-facing
26482648
// `contracts` feature rather than the perma-unstable `contracts_internals`
26492649
#[rustc_const_unstable(feature = "contracts", issue = "128044")]
2650+
#[miri::intrinsic_fallback_is_spec]
26502651
#[lang = "contract_check_requires"]
26512652
#[rustc_intrinsic]
26522653
pub const fn contract_check_requires<C: Fn() -> bool + Copy>(cond: C) {
@@ -2676,6 +2677,7 @@ pub const fn contract_check_requires<C: Fn() -> bool + Copy>(cond: C) {
26762677
// `contracts` feature rather than the perma-unstable `contracts_internals`.
26772678
// Const-checking doesn't honor allow_internal_unstable logic used by contract expansion.
26782679
#[rustc_const_unstable(feature = "contracts", issue = "128044")]
2680+
#[miri::intrinsic_fallback_is_spec]
26792681
#[lang = "contract_check_ensures"]
26802682
#[rustc_intrinsic]
26812683
pub const fn contract_check_ensures<C: Fn(&Ret) -> bool + Copy, Ret>(

0 commit comments

Comments
 (0)