about summary refs log tree commit diff
path: root/src/libcore/slice
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2018-09-17 18:34:15 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2018-09-17 18:34:15 +0200
commitebffb672950dbf6d2a19364269f95b4bc3e40dc4 (patch)
tree90d0474c56995563d851491f58086f5b1639b6ea /src/libcore/slice
parent11c631838067927cddb4c867089401ae7f9ffb8b (diff)
downloadrust-ebffb672950dbf6d2a19364269f95b4bc3e40dc4.tar.gz
rust-ebffb672950dbf6d2a19364269f95b4bc3e40dc4.zip
Adjust the docs of `from_raw_parts` to match the implementation
Diffstat (limited to 'src/libcore/slice')
-rw-r--r--src/libcore/slice/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index 3f43da9b3b6..0a719792c7f 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -3852,8 +3852,8 @@ unsafe impl<'a, T> TrustedRandomAccess for ExactChunksMut<'a, T> {
 /// them from other data. You can obtain a pointer that is usable as `data`
 /// for zero-length slices using [`NonNull::dangling()`].
 ///
-/// The total size of the slice must lower than `isize::MAX` **bytes** in
-/// memory. See the safety documentation of [`pointer::offset`].
+/// The total size of the slice must be no larger than `isize::MAX` **bytes**
+/// in memory. See the safety documentation of [`pointer::offset`].
 ///
 /// # Caveat
 ///
@@ -3892,8 +3892,8 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
 /// This function is unsafe for the same reasons as [`from_raw_parts`], as well
 /// as not being able to provide a non-aliasing guarantee of the returned
 /// mutable slice. `data` must be non-null and aligned even for zero-length
-/// slices as with [`from_raw_parts`]. The total size of the slice must be
-/// lower than `isize::MAX` **bytes** in memory. See the safety documentation
+/// slices as with [`from_raw_parts`]. The total size of the slice must be no
+/// larger than `isize::MAX` **bytes** in memory. See the safety documentation
 /// of [`pointer::offset`].
 ///
 /// See the documentation of [`from_raw_parts`] for more details.