about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2024-09-12 20:37:16 +1000
committerGitHub <noreply@github.com>2024-09-12 20:37:16 +1000
commitc3d1be7c7fc65081b84dd6e2713d417104fde164 (patch)
tree19fc0c5c6bbd4c042d1c0691ed5a8cd17bb2d4e9
parentc7162da85019c5f473e78a472caec786057a340b (diff)
parent99cad123edfa915723a5e5c0537d43b71f2cc0c5 (diff)
downloadrust-c3d1be7c7fc65081b84dd6e2713d417104fde164.tar.gz
rust-c3d1be7c7fc65081b84dd6e2713d417104fde164.zip
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"
-rw-r--r--library/core/src/slice/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index 166189f4b6c..fb732f82989 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -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
     ///