diff options
| author | bors <bors@rust-lang.org> | 2021-12-19 12:36:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-19 12:36:56 +0000 |
| commit | 41c3017c82bbc16842cc3bc1afa904e6910e293c (patch) | |
| tree | 67f3463ab2db945a7600cb08431e6078110a8c37 /library/alloc/src/vec | |
| parent | a41a6925badac7508d7a72cc1fc20f43dc6ad75e (diff) | |
| parent | 33406668125875e84d443387aad53b4d6e7d34fb (diff) | |
| download | rust-41c3017c82bbc16842cc3bc1afa904e6910e293c.tar.gz rust-41c3017c82bbc16842cc3bc1afa904e6910e293c.zip | |
Auto merge of #92099 - matthiaskrgr:rollup-4gwv67m, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #91141 (Revert "Temporarily rename int_roundings functions to avoid conflicts") - #91984 (Remove `in_band_lifetimes` from `rustc_middle`) - #92028 (Sync portable-simd to fix libcore build for AVX-512 enabled targets) - #92042 (Enable `#[thread_local]` for all windows-msvc targets) - #92071 (Update example code for Vec::splice to change the length) - #92077 (rustdoc: Remove unused `collapsed` field) - #92081 (rustdoc: Remove unnecessary `need_backline` function) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index d24b4bdffde..7185f3de18a 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2683,11 +2683,11 @@ impl<T, A: Allocator> Vec<T, A> { /// # Examples /// /// ``` - /// let mut v = vec![1, 2, 3]; - /// let new = [7, 8]; - /// let u: Vec<_> = v.splice(..2, new).collect(); - /// assert_eq!(v, &[7, 8, 3]); - /// assert_eq!(u, &[1, 2]); + /// let mut v = vec![1, 2, 3, 4]; + /// let new = [7, 8, 9]; + /// let u: Vec<_> = v.splice(1..3, new).collect(); + /// assert_eq!(v, &[1, 7, 8, 9, 4]); + /// assert_eq!(u, &[2, 3]); /// ``` #[cfg(not(no_global_oom_handling))] #[inline] |
