diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-10 22:16:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-10 22:16:45 +0100 |
| commit | 97f3b3383a605c4adbdbdfe29dfc9ba626e9d949 (patch) | |
| tree | 66de7ac7566361ac5780a222a53a6bcbacc62bea | |
| parent | 2a3a8dbdbf381faeb303bd904b6328a352e763af (diff) | |
| parent | dd2cda731aed1f107ab93a8f496f17d294526e59 (diff) | |
| download | rust-97f3b3383a605c4adbdbdfe29dfc9ba626e9d949.tar.gz rust-97f3b3383a605c4adbdbdfe29dfc9ba626e9d949.zip | |
Rollup merge of #122302 - ratmice:issue122234, r=cuviper
docs: Correct ptr/ref verbiage in SliceIndex docs. Fixes #122234
| -rw-r--r-- | library/core/src/slice/index.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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")] |
