Rollup merge of #130160 - Scripter17:fix-slice-first_mut-doc, r=Amanieu · qinheping/verify-rust-std@27049a0 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 27049a0
Rollup merge of rust-lang#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"
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -156,7 +156,7 @@ impl [T] { | ||
156 | 156 | if let [first, ..] = self { Some(first) } else { None } |
157 | 157 | } |
158 | 158 | |
159 | -/// Returns a mutable pointer to the first element of the slice, or `None` if it is empty. | |
159 | +/// Returns a mutable reference to the first element of the slice, or `None` if it is empty. | |
160 | 160 | /// |
161 | 161 | /// # Examples |
162 | 162 | /// |