Skip to content

Commit c3d1be7

Browse files
authored
Rollup merge of #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 c7162da + 99cad12 commit c3d1be7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/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)