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"
This commit is contained in:
Stuart Cook 2024-09-12 20:37:16 +10:00 committed by GitHub
commit c3d1be7c7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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
///