diff options
Diffstat (limited to 'library/core')
| -rw-r--r-- | library/core/src/io/borrowed_buf.rs | 6 | ||||
| -rw-r--r-- | library/core/src/slice/index.rs | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/library/core/src/io/borrowed_buf.rs b/library/core/src/io/borrowed_buf.rs index ed06ce6927e..778d38b1537 100644 --- a/library/core/src/io/borrowed_buf.rs +++ b/library/core/src/io/borrowed_buf.rs @@ -139,9 +139,11 @@ impl<'data> BorrowedBuf<'data> { } } -/// A writeable view of the unfilled portion of a [`BorrowedBuf`](BorrowedBuf). +/// A writeable view of the unfilled portion of a [`BorrowedBuf`]. +/// +/// The unfilled portion consists of an initialized and an uninitialized part; see [`BorrowedBuf`] +/// for details. /// -/// Provides access to the initialized and uninitialized parts of the underlying `BorrowedBuf`. /// Data can be written directly to the cursor by using [`append`](BorrowedCursor::append) or /// indirectly by getting a slice of part or all of the cursor and writing into the slice. In the /// indirect case, the caller must call [`advance`](BorrowedCursor::advance) after writing to inform diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 312dccbf109..33c2769591d 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -180,19 +180,19 @@ pub unsafe trait SliceIndex<T: ?Sized>: private_slice_index::Sealed { #[unstable(feature = "slice_index_methods", issue = "none")] fn get_mut(self, slice: &mut T) -> Option<&mut Self::Output>; - /// Returns a shared reference to the output at this location, without + /// Returns a pointer to the output at this location, without /// performing any bounds checking. /// Calling this method with an out-of-bounds index or a dangling `slice` pointer - /// is *[undefined behavior]* even if the resulting reference is not used. + /// is *[undefined behavior]* even if the resulting pointer is not used. /// /// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html #[unstable(feature = "slice_index_methods", issue = "none")] unsafe fn get_unchecked(self, slice: *const T) -> *const Self::Output; - /// Returns a mutable reference to the output at this location, without + /// Returns a mutable pointer to the output at this location, without /// performing any bounds checking. /// Calling this method with an out-of-bounds index or a dangling `slice` pointer - /// is *[undefined behavior]* even if the resulting reference is not used. + /// is *[undefined behavior]* even if the resulting pointer is not used. /// /// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html #[unstable(feature = "slice_index_methods", issue = "none")] |
