From d63e7453effff43c7af7d0780e7e0dcc3a5c63cd Mon Sep 17 00:00:00 2001 From: Jubilee <46493976+workingjubilee@users.noreply.github.com> Date: Fri, 7 Jul 2023 03:49:42 -0700 Subject: [PATCH] Fixed cast imports in doctest (rust-lang/portable-simd#355) --- crates/core_simd/src/elements/float.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/core_simd/src/elements/float.rs b/crates/core_simd/src/elements/float.rs index 70b18eee0c0..22c5fdcd118 100644 --- a/crates/core_simd/src/elements/float.rs +++ b/crates/core_simd/src/elements/float.rs @@ -26,7 +26,9 @@ pub trait SimdFloat: Copy + Sealed { /// # Example /// ``` /// # #![feature(portable_simd)] - /// # use core::simd::Simd; + /// # #[cfg(feature = "as_crate")] use core_simd::simd; + /// # #[cfg(not(feature = "as_crate"))] use core::simd; + /// # use simd::{f32x2, SimdFloat, SimdInt, Simd}; /// let floats: Simd = Simd::from_array([1.9, -4.5, f32::INFINITY, f32::NAN]); /// let ints = floats.cast::(); /// assert_eq!(ints, Simd::from_array([1, -4, i32::MAX, 0]));