Rollup merge of #94790 - RalfJung:portable-simd-miri, r=Dylan-DPC

enable portable-simd doctests in Miri

With https://github.com/rust-lang/miri/pull/2013 we shouldn't need to disable these tests any more. :)
This commit is contained in:
Dylan DPC 2022-03-10 23:13:01 +01:00 committed by GitHub
commit 3979e150cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 7 deletions

View File

@ -412,12 +412,10 @@ pub mod arch {
#[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)] #[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)]
#[allow(rustdoc::bare_urls)] #[allow(rustdoc::bare_urls)]
#[unstable(feature = "portable_simd", issue = "86656")] #[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(all(miri, doctest)))] // Skip SIMD doctests in Miri
mod core_simd; mod core_simd;
#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")] #[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
#[unstable(feature = "portable_simd", issue = "86656")] #[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(all(miri, doctest)))] // Skip SIMD doctests in Miri
pub mod simd { pub mod simd {
#[unstable(feature = "portable_simd", issue = "86656")] #[unstable(feature = "portable_simd", issue = "86656")]
pub use crate::core_simd::simd::*; pub use crate::core_simd::simd::*;

View File

@ -16,7 +16,6 @@
use crate::ptr; use crate::ptr;
use crate::result::Result; use crate::result::Result;
use crate::result::Result::{Err, Ok}; use crate::result::Result::{Err, Ok};
#[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests
use crate::simd::{self, Simd}; use crate::simd::{self, Simd};
use crate::slice; use crate::slice;
@ -3544,7 +3543,6 @@ pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T]) {
/// assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0); /// assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
/// ``` /// ```
#[unstable(feature = "portable_simd", issue = "86656")] #[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests
pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T]) pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
where where
Simd<T, LANES>: AsRef<[T; LANES]>, Simd<T, LANES>: AsRef<[T; LANES]>,
@ -3588,7 +3586,6 @@ pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
/// be lifted in a way that would make it possible to see panics from this /// be lifted in a way that would make it possible to see panics from this
/// method for something like `LANES == 3`. /// method for something like `LANES == 3`.
#[unstable(feature = "portable_simd", issue = "86656")] #[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests
pub fn as_simd_mut<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T]) pub fn as_simd_mut<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])
where where
Simd<T, LANES>: AsMut<[T; LANES]>, Simd<T, LANES>: AsMut<[T; LANES]>,

View File

@ -501,10 +501,8 @@
#[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)] #[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)]
#[allow(rustdoc::bare_urls)] #[allow(rustdoc::bare_urls)]
#[unstable(feature = "portable_simd", issue = "86656")] #[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
mod std_float; 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")] #[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
#[unstable(feature = "portable_simd", issue = "86656")] #[unstable(feature = "portable_simd", issue = "86656")]
pub mod simd { pub mod simd {