From 6736d7b5a3e4247326312dda106ab8d741c6cfdf Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Fri, 22 Mar 2024 14:11:00 -0700 Subject: [PATCH] [portable-simd] Fix build break and doc test failure --- library/portable-simd/crates/core_simd/src/vector.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/portable-simd/crates/core_simd/src/vector.rs b/library/portable-simd/crates/core_simd/src/vector.rs index ee0926bcae8f1..6c8205b112c31 100644 --- a/library/portable-simd/crates/core_simd/src/vector.rs +++ b/library/portable-simd/crates/core_simd/src/vector.rs @@ -4,6 +4,7 @@ use crate::simd::{ ptr::{SimdConstPtr, SimdMutPtr}, LaneCount, Mask, MaskElement, SupportedLaneCount, Swizzle, }; +use core::convert::{TryFrom, TryInto}; /// A SIMD vector with the shape of `[T; N]` but the operations of `T`. /// @@ -324,7 +325,7 @@ where /// # #![feature(portable_simd)] /// # #[cfg(feature = "as_crate")] use core_simd::simd; /// # #[cfg(not(feature = "as_crate"))] use core::simd; - /// # use simd::{Simd, Mask}; + /// # use simd::Simd; /// let vec: Vec = vec![10, 11]; /// /// let result = Simd::::load_or_default(&vec); @@ -347,7 +348,7 @@ where /// # #![feature(portable_simd)] /// # #[cfg(feature = "as_crate")] use core_simd::simd; /// # #[cfg(not(feature = "as_crate"))] use core::simd; - /// # use simd::{Simd, Mask}; + /// # use simd::Simd; /// let vec: Vec = vec![10, 11]; /// let or = Simd::from_array([-5, -4, -3, -2]); /// @@ -694,7 +695,7 @@ where /// /// # Safety /// - /// Memory addresses for element are calculated [`core::ptr::wrapping_offset`] and + /// Memory addresses for element are calculated [`pointer::wrapping_offset`] and /// each enabled element must satisfy the same conditions as [`core::ptr::write`]. #[inline] pub unsafe fn store_select_ptr(self, ptr: *mut T, enable: Mask<::Mask, N>) {