mirror of https://github.com/rust-lang/rust.git
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