| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-04-06 | add detailed panic messages for Vec functions | IgorPerikov | -6/+55 | |
| 2020-04-05 | Rollup merge of #70558 - RalfJung:vec-extend-aliasing, r=Amanieu | Dylan DPC | -9/+13 | |
| Fix some aliasing issues in Vec `Vec::extend` and `Vec::truncate` invalidated references into the vector even without reallocation, because they (implicitly) created a mutable reference covering the *entire* initialized part of the vector. Fixes https://github.com/rust-lang/rust/issues/70301 I verified the fix by adding some new tests here that I ran in Miri. | ||||
| 2020-04-05 | tweak swap_remove | Ralf Jung | -3/+4 | |
| 2020-04-04 | use ManuallyDrop instead of forget inside collections | Trevor Spiteri | -14/+13 | |
| This commit changes some usage of mem::forget into mem::ManuallyDrop in some Vec, VecDeque, BTreeMap and Box methods. Before the commit, the generated IR for some of the methods was longer, and even after optimization, some unwinding artifacts were still present. | ||||
| 2020-04-02 | Auto merge of #70362 - TimDiekmann:alloc-overhaul, r=Amanieu | bors | -1/+2 | |
| Overhaul of the `AllocRef` trait to match allocator-wg's latest consens; Take 2 GitHub won't let me reopen #69889 so I make a new PR. In addition to #69889 this fixes the unsoundness of `RawVec::into_box` when using allocators supporting overallocating. Also it uses `MemoryBlock` in `AllocRef` to unify `_in_place` methods by passing `&mut MemoryBlock`. Additionally, `RawVec` now checks for `size_of::<T>()` again and ignore every ZST. The internal capacity of `RawVec` isn't used by ZSTs anymore, as `into_box` now requires a length to be specified. r? @Amanieu fixes rust-lang/wg-allocators#38 fixes rust-lang/wg-allocators#41 fixes rust-lang/wg-allocators#44 fixes rust-lang/wg-allocators#51 | ||||
| 2020-03-30 | fix and test aliasing in swap_remove | Ralf Jung | -3/+4 | |
| 2020-03-30 | fix aliasing in remove() | Ralf Jung | -4/+2 | |
| also add smoke test to detect relocation even in rustc runs | ||||
| 2020-03-30 | fix ptr invalidation in Vec::truncate | Ralf Jung | -1/+2 | |
| 2020-03-30 | fix pointer invalidation when extnding a vector from an untrusted iterator | Ralf Jung | -1/+3 | |
| 2020-03-30 | fix Vec::extend invalidating unrelated pointers | Ralf Jung | -1/+2 | |
| 2020-03-29 | Rollup merge of #68692 - jyn514:vec-from-array, r=LukasKalbertodt | Mazdak Farrokhzad | -0/+16 | |
| impl From<[T; N]> for Vec<T> Closes https://github.com/rust-lang/rust/issues/67963 | ||||
| 2020-03-26 | Fix issues from review and unsoundness of `RawVec::into_box` | Tim Diekmann | -1/+2 | |
| 2020-03-26 | Overhaul of the `AllocRef` trait to match allocator-wg's latest consens | Tim Diekmann | -1/+1 | |
| 2020-03-20 | must_use on split_off | Kornel | -0/+1 | |
| 2020-03-11 | Rollup merge of #69828 - RalfJung:vec-leak, r=kennytm | Mazdak Farrokhzad | -4/+12 | |
| fix memory leak when vec::IntoIter panics during drop Fixes https://github.com/rust-lang/rust/issues/69770 | ||||
| 2020-03-10 | Allow vec.rs to be over 3000 lines :( | Joshua Nelson | -0/+1 | |
| 2020-03-10 | Bump release cutoff | Joshua Nelson | -1/+1 | |
| 2020-03-10 | make the impl a little prettier | Joshua Nelson | -1/+1 | |
| 2020-03-10 | fix test failure | Joshua Nelson | -2/+7 | |
| 2020-03-10 | limit From impl to LengthAtMost32 | Joshua Nelson | -1/+4 | |
| Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com> | ||||
| 2020-03-10 | fix error compiling stage2 | Joshua Nelson | -1/+1 | |
| Co-Authored-By: lzutao <taolzu@gmail.com> | ||||
| 2020-03-10 | impl From<[T; N]> for Vec<T> | Joshua Nelson | -0/+7 | |
| 2020-03-09 | Vec::new is const tstable in 1.39 not 1.32 | Christopher Durham | -1/+1 | |
| 2020-03-08 | fix memory leak when vec::IntoIter panics during drop | Ralf Jung | -4/+12 | |
| 2020-03-07 | Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkov | Mazdak Farrokhzad | -1/+1 | |
| fix various typos | ||||
| 2020-03-06 | Don't redundantly repeat field names (clippy::redundant_field_names) | Matthias Krüger | -1/+1 | |
| 2020-03-06 | fix various typos | Matthias Krüger | -1/+1 | |
| 2020-03-01 | Rollup merge of #69568 - JOE1994:patch-2, r=Dylan-DPC | Dylan DPC | -2/+3 | |
| Clarify explanation of Vec<T> 'fn resize' 1. Clarified on what should implement `Clone` trait. 2. Minor grammar fix: to be able clone => to be able **to** clone | ||||
| 2020-02-29 | clarify alignment requirements in Vec::from_raw_parts | Ralf Jung | -1/+5 | |
| 2020-02-29 | Remove trailing whitespace | Youngsuk Kim | -1/+1 | |
| Removed trailing whitespace which caused to fail pretty-check | ||||
| 2020-02-29 | Update src/liballoc/vec.rs | Youngsuk Kim | -1/+1 | |
| Following suggestion from @jonas-schievink Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com> | ||||
| 2020-02-28 | Clarify explanation of 'fn resize' | Youngsuk Kim | -2/+3 | |
| 1. Clarified on what should implement 'Clone' trait. 2. Minor grammar fix: to be able clone => to be able to clone | ||||
| 2020-02-26 | Auto merge of #67290 - jonas-schievink:leak-audit, r=KodrAus | bors | -14/+35 | |
| Audit liballoc for leaks in `Drop` impls when user destructor panics Inspired by https://github.com/rust-lang/rust/pull/67243 and https://github.com/rust-lang/rust/pull/67235, this audits and hopefully fixes the remaining `Drop` impls in liballoc for resource leaks in the presence of panics in destructors called by the affected `Drop` impl. This does not touch `Hash{Map,Set}` since they live in hashbrown. They have similar issues though. r? @KodrAus | ||||
| 2020-01-31 | Fixed issue 68593 | hman523 | -0/+2 | |
| 2020-01-28 | fix: typo in vec.rs | Pedro de Brito | -1/+1 | |
| 2020-01-19 | Update comments in `Drain`s `Drop` impl | Jonas Schievink | -3/+5 | |
| 2020-01-19 | Fix leak in vec::IntoIter when a destructor panics | Jonas Schievink | -1/+3 | |
| 2020-01-19 | Avoid leak in `vec::Drain` when item drop panics | Jonas Schievink | -13/+30 | |
| 2020-01-11 | Revert "Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, ↵ | Lzu Tao | -1/+2 | |
| r=alexcrichton" This reverts commit 4ed415b5478c74094c2859abfddb959588cd6bb1, reversing changes made to 3cce950743e8aa74a4378dfdefbbc80223a00865. | ||||
| 2020-01-07 | Rollup merge of #67929 - mgrachev:patch-1, r=jonas-schievink | Yuki Okushi | -1/+1 | |
| Formatting an example for method Vec.retain | ||||
| 2020-01-06 | stabilise it | dylan_DPC | -1/+1 | |
| 2020-01-06 | stabilise remove_item | dylan_DPC | -1/+0 | |
| 2020-01-06 | Formatting an example for method Vec.retain | Grachev Mikhail | -1/+1 | |
| 2020-01-05 | removed blank line | dylan_DPC | -1/+0 | |
| 2020-01-04 | ef em ti ... :P | dylan_DPC | -4/+3 | |
| 2020-01-04 | add partial eq bound to remove_item | dylan_DPC | -1/+8 | |
| 2019-12-26 | Remove redundant link texts | Matthew Kraai | -2/+2 | |
| 2019-12-22 | Format the world | Mark Rousskov | -123/+125 | |
| 2019-12-18 | Propagate cfg bootstrap | Mark Rousskov | -4/+1 | |
| 2019-12-15 | Rollup merge of #67300 - aloucks:issue-65970, r=rkruppe | Mazdak Farrokhzad | -1/+16 | |
| Restore original implementation of Vec::retain This PR reverts #48065, which aimed to optimize `Vec::retain` by making use of `Vec::drain_filter`. Unfortunately at that time, `drain_filter` was unsound. The soundness hole in `Vec::drain_filter` was fixed in #61224 by guaranteeing that cleanup logic runs via a nested `Drop`, even in the event of a panic. Implementing this nested drop affects codegen (apparently?) and results in slower code. Fixes #65970 | ||||
