From d7ddcc4bfa4ef1bfab746c4ce8519f35dc6dc6d8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 10 May 2026 13:07:11 +0200 Subject: [PATCH] update cfg(miri)-related comments --- library/core/src/primitive_docs.rs | 2 +- library/coretests/tests/num/midpoint.rs | 10 +++++----- src/tools/miri/src/bin/miri.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index 48bf57356b57..9efcabcf3f19 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -1777,7 +1777,7 @@ mod prim_ref {} /// However, a direct cast back is not possible. You need to use `transmute`: /// /// ```rust -/// # #[cfg(not(miri))] { // FIXME: use strict provenance APIs once they are stable, then remove this `cfg` +/// # #[cfg(not(miri))] { // disabled because it fails with -Zmiri-strict-provenance /// # let fnptr: fn(i32) -> i32 = |x| x+2; /// # let fnptr_addr = fnptr as usize; /// let fnptr = fnptr_addr as *const (); diff --git a/library/coretests/tests/num/midpoint.rs b/library/coretests/tests/num/midpoint.rs index 71e980067842..240a4e8d68aa 100644 --- a/library/coretests/tests/num/midpoint.rs +++ b/library/coretests/tests/num/midpoint.rs @@ -4,7 +4,7 @@ //! - midpoint(-a, -b) == -midpoint(a, b) #[test] -#[cfg(not(miri))] +#[cfg(not(miri))] // Miri is too slow fn midpoint_obvious_impl_i8() { for a in i8::MIN..=i8::MAX { for b in i8::MIN..=i8::MAX { @@ -14,7 +14,7 @@ fn midpoint_obvious_impl_i8() { } #[test] -#[cfg(not(miri))] +#[cfg(not(miri))] // Miri is too slow fn midpoint_obvious_impl_u8() { for a in u8::MIN..=u8::MAX { for b in u8::MIN..=u8::MAX { @@ -24,7 +24,7 @@ fn midpoint_obvious_impl_u8() { } #[test] -#[cfg(not(miri))] +#[cfg(not(miri))] // Miri is too slow fn midpoint_order_expectation_i8() { for a in i8::MIN..=i8::MAX { for b in i8::MIN..=i8::MAX { @@ -34,7 +34,7 @@ fn midpoint_order_expectation_i8() { } #[test] -#[cfg(not(miri))] +#[cfg(not(miri))] // Miri is too slow fn midpoint_order_expectation_u8() { for a in u8::MIN..=u8::MAX { for b in u8::MIN..=u8::MAX { @@ -44,7 +44,7 @@ fn midpoint_order_expectation_u8() { } #[test] -#[cfg(not(miri))] +#[cfg(not(miri))] // Miri is too slow fn midpoint_negative_expectation() { for a in 0..=i8::MAX { for b in 0..=i8::MAX { diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index fef35795dc69..ba662346a028 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -188,7 +188,7 @@ fn make_miri_codegen_backend(sess: &Session) -> Box { cfg.has_reliable_f128 = true; // We always provide the f16 intrinsics, but some are provided via the host, // so forward its reliability. - cfg.has_reliable_f16_math = cfg!(target_has_reliable_f16); + cfg.has_reliable_f16_math = cfg!(target_has_reliable_f16_math); // Many f128 operations are still missing. cfg.has_reliable_f128_math = false; cfg