@@ -47,23 +47,23 @@ macro_rules! simd_swizzle {
4747 } => {
4848 {
4949 use $crate:: simd:: Swizzle ;
50- struct SwizzleImpl ;
51- impl <const LANES : usize > Swizzle <LANES , { $index. len( ) } > for SwizzleImpl {
50+ struct Impl ;
51+ impl <const LANES : usize > Swizzle <LANES , { $index. len( ) } > for Impl {
5252 const INDEX : [ usize ; { $index. len( ) } ] = $index;
5353 }
54- SwizzleImpl :: swizzle( $vector)
54+ Impl :: swizzle( $vector)
5555 }
5656 } ;
5757 {
5858 $first: expr, $second: expr, $index: expr $( , ) ?
5959 } => {
6060 {
6161 use $crate:: simd:: { Which , Swizzle2 } ;
62- struct SwizzleImpl ;
63- impl <const LANES : usize > Swizzle2 <LANES , { $index. len( ) } > for SwizzleImpl {
62+ struct Impl ;
63+ impl <const LANES : usize > Swizzle2 <LANES , { $index. len( ) } > for Impl {
6464 const INDEX : [ Which ; { $index. len( ) } ] = $index;
6565 }
66- SwizzleImpl :: swizzle2( $first, $second)
66+ Impl :: swizzle2( $first, $second)
6767 }
6868 }
6969}
@@ -118,6 +118,7 @@ pub trait Swizzle2<const INPUT_LANES: usize, const OUTPUT_LANES: usize> {
118118}
119119
120120/// The `simd_shuffle` intrinsic expects `u32`, so do error checking and conversion here.
121+ /// This trait hides `INDEX_IMPL` from the public API.
121122trait SwizzleImpl < const INPUT_LANES : usize , const OUTPUT_LANES : usize > {
122123 const INDEX_IMPL : [ u32 ; OUTPUT_LANES ] ;
123124}
@@ -142,6 +143,7 @@ where
142143}
143144
144145/// The `simd_shuffle` intrinsic expects `u32`, so do error checking and conversion here.
146+ /// This trait hides `INDEX_IMPL` from the public API.
145147trait Swizzle2Impl < const INPUT_LANES : usize , const OUTPUT_LANES : usize > {
146148 const INDEX_IMPL : [ u32 ; OUTPUT_LANES ] ;
147149}
@@ -258,8 +260,6 @@ where
258260 /// The second result contains the last `LANES / 2` lanes from `self` and `other`,
259261 /// alternating, starting with the lane `LANES / 2` from the start of `self`.
260262 ///
261- /// This particular permutation is efficient on many architectures.
262- ///
263263 /// ```
264264 /// #![feature(portable_simd)]
265265 /// # use core_simd::Simd;
@@ -322,8 +322,6 @@ where
322322 /// The second result takes every other lane of `self` and then `other`, starting with
323323 /// the second lane.
324324 ///
325- /// This particular permutation is efficient on many architectures.
326- ///
327325 /// ```
328326 /// #![feature(portable_simd)]
329327 /// # use core_simd::Simd;
0 commit comments