From 29d979fb3c2fb2caf0727b29b22ac400947fc101 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 9 Mar 2022 19:31:25 -0500 Subject: [PATCH] enable portable-simd doctests in Miri --- library/core/src/lib.rs | 2 -- library/core/src/slice/mod.rs | 3 --- library/std/src/lib.rs | 2 -- 3 files changed, 7 deletions(-) diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index f436afbee448e..f6ede8964ff8b 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -408,12 +408,10 @@ pub mod arch { #[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)] #[allow(rustdoc::bare_urls)] #[unstable(feature = "portable_simd", issue = "86656")] -#[cfg(not(all(miri, doctest)))] // Skip SIMD doctests in Miri mod core_simd; #[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")] #[unstable(feature = "portable_simd", issue = "86656")] -#[cfg(not(all(miri, doctest)))] // Skip SIMD doctests in Miri pub mod simd { #[unstable(feature = "portable_simd", issue = "86656")] pub use crate::core_simd::simd::*; diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 9467c7f54bac7..839dce4ca0b18 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -16,7 +16,6 @@ use crate::option::Option::{None, Some}; use crate::ptr; use crate::result::Result; use crate::result::Result::{Err, Ok}; -#[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests use crate::simd::{self, Simd}; use crate::slice; @@ -3540,7 +3539,6 @@ impl [T] { /// assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0); /// ``` #[unstable(feature = "portable_simd", issue = "86656")] - #[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests pub fn as_simd(&self) -> (&[T], &[Simd], &[T]) where Simd: AsRef<[T; LANES]>, @@ -3584,7 +3582,6 @@ impl [T] { /// be lifted in a way that would make it possible to see panics from this /// method for something like `LANES == 3`. #[unstable(feature = "portable_simd", issue = "86656")] - #[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests pub fn as_simd_mut(&mut self) -> (&mut [T], &mut [Simd], &mut [T]) where Simd: AsMut<[T; LANES]>, diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index c35389d44f9fc..6c801f2f0c56c 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -495,10 +495,8 @@ pub mod lazy; #[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)] #[allow(rustdoc::bare_urls)] #[unstable(feature = "portable_simd", issue = "86656")] -#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics mod std_float; -#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics #[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")] #[unstable(feature = "portable_simd", issue = "86656")] pub mod simd {