Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 27049a0

Browse files
authoredSep 12, 2024
Rollup merge of rust-lang#130160 - Scripter17:fix-slice-first_mut-doc, r=Amanieu
Fix `slice::first_mut` docs Changes `pointer` to `reference` since that's the actual type it returns. `slice::last_mut` does correctly say "reference"
2 parents 03dedd9 + 4b1440a commit 27049a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<T> [T] {
156156
if let [first, ..] = self { Some(first) } else { None }
157157
}
158158

159-
/// Returns a mutable pointer to the first element of the slice, or `None` if it is empty.
159+
/// Returns a mutable reference to the first element of the slice, or `None` if it is empty.
160160
///
161161
/// # Examples
162162
///

0 commit comments

Comments
 (0)
Please sign in to comment.