Rollup merge of #141110 - xizheyin:issue-141107, r=workingjubilee

[std] fix the presentation of `split_off_mut` and `split_off` documentation

Fixes #141107

r? libs
This commit is contained in:
Stuart Cook 2025-05-19 13:24:55 +10:00 committed by GitHub
commit 93bc64dd49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4383,7 +4383,7 @@ impl<T> [T] {
/// assert_eq!(first_three, &['a', 'b', 'c']);
/// ```
///
/// Splitting off the last two elements of a slice:
/// Splitting off a slice starting with the third element:
///
/// ```
/// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
@ -4449,7 +4449,7 @@ impl<T> [T] {
/// assert_eq!(first_three, &mut ['a', 'b', 'c']);
/// ```
///
/// Taking the last two elements of a slice:
/// Splitting off a slice starting with the third element:
///
/// ```
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];