@@ -16,7 +16,9 @@ pub trait SimdInt: Copy + Sealed {
1616 /// # Examples
1717 /// ```
1818 /// # #![feature(portable_simd)]
19- /// # use core::simd::Simd;
19+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
20+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
21+ /// # use simd::{Simd, SimdInt};
2022 /// use core::i32::{MIN, MAX};
2123 /// let x = Simd::from_array([MIN, 0, 1, MAX]);
2224 /// let max = Simd::splat(MAX);
@@ -32,7 +34,9 @@ pub trait SimdInt: Copy + Sealed {
3234 /// # Examples
3335 /// ```
3436 /// # #![feature(portable_simd)]
35- /// # use core::simd::Simd;
37+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
38+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
39+ /// # use simd::{Simd, SimdInt};
3640 /// use core::i32::{MIN, MAX};
3741 /// let x = Simd::from_array([MIN, -2, -1, MAX]);
3842 /// let max = Simd::splat(MAX);
@@ -48,7 +52,9 @@ pub trait SimdInt: Copy + Sealed {
4852 /// # Examples
4953 /// ```
5054 /// # #![feature(portable_simd)]
51- /// # use core::simd::Simd;
55+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
56+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
57+ /// # use simd::{Simd, SimdInt};
5258 /// use core::i32::{MIN, MAX};
5359 /// let xs = Simd::from_array([MIN, MIN +1, -5, 0]);
5460 /// assert_eq!(xs.abs(), Simd::from_array([MIN, MAX, 5, 0]));
@@ -61,7 +67,9 @@ pub trait SimdInt: Copy + Sealed {
6167 /// # Examples
6268 /// ```
6369 /// # #![feature(portable_simd)]
64- /// # use core::simd::Simd;
70+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
71+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
72+ /// # use simd::{Simd, SimdInt};
6573 /// use core::i32::{MIN, MAX};
6674 /// let xs = Simd::from_array([MIN, -2, 0, 3]);
6775 /// let unsat = xs.abs();
@@ -77,7 +85,9 @@ pub trait SimdInt: Copy + Sealed {
7785 /// # Examples
7886 /// ```
7987 /// # #![feature(portable_simd)]
80- /// # use core::simd::Simd;
88+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
89+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
90+ /// # use simd::{Simd, SimdInt};
8191 /// use core::i32::{MIN, MAX};
8292 /// let x = Simd::from_array([MIN, -2, 3, MAX]);
8393 /// let unsat = -x;
@@ -105,7 +115,9 @@ pub trait SimdInt: Copy + Sealed {
105115 ///
106116 /// ```
107117 /// # #![feature(portable_simd)]
108- /// # use core::simd::i32x4;
118+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
119+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
120+ /// # use simd::{i32x4, SimdInt};
109121 /// let v = i32x4::from_array([1, 2, 3, 4]);
110122 /// assert_eq!(v.reduce_sum(), 10);
111123 ///
@@ -121,7 +133,9 @@ pub trait SimdInt: Copy + Sealed {
121133 ///
122134 /// ```
123135 /// # #![feature(portable_simd)]
124- /// # use core::simd::i32x4;
136+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
137+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
138+ /// # use simd::{i32x4, SimdInt};
125139 /// let v = i32x4::from_array([1, 2, 3, 4]);
126140 /// assert_eq!(v.reduce_product(), 24);
127141 ///
@@ -137,7 +151,9 @@ pub trait SimdInt: Copy + Sealed {
137151 ///
138152 /// ```
139153 /// # #![feature(portable_simd)]
140- /// # use core::simd::i32x4;
154+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
155+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
156+ /// # use simd::{i32x4, SimdInt};
141157 /// let v = i32x4::from_array([1, 2, 3, 4]);
142158 /// assert_eq!(v.reduce_max(), 4);
143159 /// ```
@@ -149,7 +165,9 @@ pub trait SimdInt: Copy + Sealed {
149165 ///
150166 /// ```
151167 /// # #![feature(portable_simd)]
152- /// # use core::simd::i32x4;
168+ /// # #[cfg(feature = "as_crate")] use core_simd::simd;
169+ /// # #[cfg(not(feature = "as_crate"))] use core::simd;
170+ /// # use simd::{i32x4, SimdInt};
153171 /// let v = i32x4::from_array([1, 2, 3, 4]);
154172 /// assert_eq!(v.reduce_min(), 1);
155173 /// ```
0 commit comments