Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 97f3b33

Browse files
Rollup merge of #122302 - ratmice:issue122234, r=cuviper
docs: Correct ptr/ref verbiage in SliceIndex docs. Fixes #122234
2 parents 2a3a8db + dd2cda7 commit 97f3b33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎library/core/src/slice/index.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,19 @@ pub unsafe trait SliceIndex<T: ?Sized>: private_slice_index::Sealed {
180180
#[unstable(feature = "slice_index_methods", issue = "none")]
181181
fn get_mut(self, slice: &mut T) -> Option<&mut Self::Output>;
182182

183-
/// Returns a shared reference to the output at this location, without
183+
/// Returns a pointer to the output at this location, without
184184
/// performing any bounds checking.
185185
/// Calling this method with an out-of-bounds index or a dangling `slice` pointer
186-
/// is *[undefined behavior]* even if the resulting reference is not used.
186+
/// is *[undefined behavior]* even if the resulting pointer is not used.
187187
///
188188
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
189189
#[unstable(feature = "slice_index_methods", issue = "none")]
190190
unsafe fn get_unchecked(self, slice: *const T) -> *const Self::Output;
191191

192-
/// Returns a mutable reference to the output at this location, without
192+
/// Returns a mutable pointer to the output at this location, without
193193
/// performing any bounds checking.
194194
/// Calling this method with an out-of-bounds index or a dangling `slice` pointer
195-
/// is *[undefined behavior]* even if the resulting reference is not used.
195+
/// is *[undefined behavior]* even if the resulting pointer is not used.
196196
///
197197
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
198198
#[unstable(feature = "slice_index_methods", issue = "none")]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /