mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 05:51:58 +00:00
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:
commit
c3d1be7c7f
@ -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
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user