`*mut [T]::split_at_mut_unchecked` doesn't document the `mid > len` case
Open
Beginner friendly
Nobody has claimed this yet.
needs-triage
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
*mut [T]::split_at_mut_unchecked can create unexpectedly large slices if mid > len as len - mid will overflow. Its documentation doesn't mention this behavior and it could lead to UB in callers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the documentation for *mut [T]::split_at_mut_unchecked and read its current safety notes, focusing on the mid > len case described in the issue. Update the documentation to explain the resulting overflow and potential for unexpectedly large slices or UB in callers; the issue is done when that behavior is explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100