File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ impl<T: ?Sized> NonNull<T> {
143143}
144144
145145impl < T > NonNull < [ T ] > {
146- /// Create a non-null raw slice from a thin pointer and a length.
146+ /// Creates a non-null raw slice from a thin pointer and a length.
147147 ///
148148 /// The `len` argument is the number of **elements**, not the number of bytes.
149149 ///
@@ -171,12 +171,12 @@ impl<T> NonNull<[T]> {
171171 #[ unstable( feature = "nonnull_slice_from_raw_parts" , issue = "71941" ) ]
172172 #[ rustc_const_unstable( feature = "const_nonnull_slice_from_raw_parts" , issue = "71941" ) ]
173173 #[ inline]
174- pub const fn slice_from_raw_parts ( data : NonNull < T > , size : usize ) -> Self {
174+ pub const fn slice_from_raw_parts ( data : NonNull < T > , len : usize ) -> Self {
175175 // SAFETY: `data` is a `NonNull` pointer which is necessarily non-null
176- unsafe { Self :: new_unchecked ( super :: slice_from_raw_parts_mut ( data. as_ptr ( ) , size ) ) }
176+ unsafe { Self :: new_unchecked ( super :: slice_from_raw_parts_mut ( data. as_ptr ( ) , len ) ) }
177177 }
178178
179- /// Return the length and a non-null raw slice.
179+ /// Returns the length of a non-null raw slice.
180180 ///
181181 /// The returned value is the number of **elements**, not the number of bytes.
182182 ///
You can’t perform that action at this time.
0 commit comments