Skip to content

Commit

Permalink
Rollup merge of #130160 - Scripter17:fix-slice-first_mut-doc, r=Amanieu
Browse files Browse the repository at this point in the history
Fix `slice::first_mut` docs

Changes `pointer` to `reference` since that's the actual type it returns.

`slice::last_mut` does correctly say "reference"
  • Loading branch information
Zalathar committed Sep 12, 2024
2 parents c7162da + 99cad12 commit c3d1be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl<T> [T] {
if let [first, ..] = self { Some(first) } else { None }
}

/// Returns a mutable pointer to the first element of the slice, or `None` if it is empty.
/// Returns a mutable reference to the first element of the slice, or `None` if it is empty.
///
/// # Examples
///
Expand Down

0 comments on commit c3d1be7

Please sign in to comment.