mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
enable portable-simd doctests in Miri
This commit is contained in:
parent
458262b131
commit
29d979fb3c
@ -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::*;
|
||||
|
@ -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> [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<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
|
||||
where
|
||||
Simd<T, LANES>: AsRef<[T; LANES]>,
|
||||
@ -3584,7 +3582,6 @@ impl<T> [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<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])
|
||||
where
|
||||
Simd<T, LANES>: AsMut<[T; LANES]>,
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user