@@ -112,7 +112,7 @@ where
112112 T : SimdElement ,
113113{
114114 /// Number of elements in this vector.
115- pub const LANES : usize = N ;
115+ pub const LEN : usize = N ;
116116
117117 /// Returns the number of elements in this SIMD vector.
118118 ///
@@ -122,11 +122,11 @@ where
122122 /// # #![feature(portable_simd)]
123123 /// # use core::simd::u32x4;
124124 /// let v = u32x4::splat(0);
125- /// assert_eq!(v.lanes (), 4);
125+ /// assert_eq!(v.len (), 4);
126126 /// ```
127127 #[ inline]
128- pub const fn lanes ( & self ) -> usize {
129- Self :: LANES
128+ pub const fn len ( & self ) -> usize {
129+ Self :: LEN
130130 }
131131
132132 /// Constructs a new SIMD vector with all elements set to the given value.
@@ -273,7 +273,7 @@ where
273273 #[ track_caller]
274274 pub const fn from_slice ( slice : & [ T ] ) -> Self {
275275 assert ! (
276- slice. len( ) >= Self :: LANES ,
276+ slice. len( ) >= Self :: LEN ,
277277 "slice length must be at least the number of elements"
278278 ) ;
279279 // SAFETY: We just checked that the slice contains
@@ -303,7 +303,7 @@ where
303303 #[ track_caller]
304304 pub fn copy_to_slice ( self , slice : & mut [ T ] ) {
305305 assert ! (
306- slice. len( ) >= Self :: LANES ,
306+ slice. len( ) >= Self :: LEN ,
307307 "slice length must be at least the number of elements"
308308 ) ;
309309 // SAFETY: We just checked that the slice contains
0 commit comments