Skip to content

Commit ebffb67

Browse files
committed
Adjust the docs of from_raw_parts to match the implementation
1 parent 11c6318 commit ebffb67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/slice/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3852,8 +3852,8 @@ unsafe impl<'a, T> TrustedRandomAccess for ExactChunksMut<'a, T> {
38523852
/// them from other data. You can obtain a pointer that is usable as `data`
38533853
/// for zero-length slices using [`NonNull::dangling()`].
38543854
///
3855-
/// The total size of the slice must lower than `isize::MAX` **bytes** in
3856-
/// memory. See the safety documentation of [`pointer::offset`].
3855+
/// The total size of the slice must be no larger than `isize::MAX` **bytes**
3856+
/// in memory. See the safety documentation of [`pointer::offset`].
38573857
///
38583858
/// # Caveat
38593859
///
@@ -3892,8 +3892,8 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
38923892
/// This function is unsafe for the same reasons as [`from_raw_parts`], as well
38933893
/// as not being able to provide a non-aliasing guarantee of the returned
38943894
/// mutable slice. `data` must be non-null and aligned even for zero-length
3895-
/// slices as with [`from_raw_parts`]. The total size of the slice must be
3896-
/// lower than `isize::MAX` **bytes** in memory. See the safety documentation
3895+
/// slices as with [`from_raw_parts`]. The total size of the slice must be no
3896+
/// larger than `isize::MAX` **bytes** in memory. See the safety documentation
38973897
/// of [`pointer::offset`].
38983898
///
38993899
/// See the documentation of [`from_raw_parts`] for more details.

0 commit comments

Comments
 (0)