Skip to content

Commit

Permalink
Rollup merge of rust-lang#130160 - Scripter17:fix-slice-first_mut-doc…
Browse files Browse the repository at this point in the history
…, 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"
  • Loading branch information
Zalathar authored Sep 12, 2024
2 parents 03dedd9 + 4b1440a commit 27049a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 27049a0

Please sign in to comment.