rust/library/alloc/tests
Dylan DPC d6c959c680
Rollup merge of #95298 - jhorstmann:fix-double-drop-of-allocator-in-vec-into-iter, r=oli-obk
Fix double drop of allocator in IntoIter impl of Vec

Fixes #95269

The `drop` impl of `IntoIter` reconstructs a `RawVec` from `buf`, `cap` and `alloc`, when that `RawVec` is dropped it also drops the allocator. To avoid dropping the allocator twice we wrap it in `ManuallyDrop` in the `InttoIter` struct.

Note this is my first contribution to the standard library, so I might be missing some details or a better way to solve this.
2022-03-31 00:26:32 +02:00
..
arc.rs Add Weak may_dangle tests 2021-05-20 19:42:29 -07:00
binary_heap.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
borrow.rs Move various ui const tests to library 2020-09-04 02:35:27 +02:00
boxed.rs Revert accidental stabilization 2022-03-10 14:36:51 +00:00
btree_set_hash.rs Include the length in BTree hashes 2021-10-01 12:29:09 -07:00
const_fns.rs BTree: remove Ord bound from new 2021-08-18 03:55:36 +01:00
cow_str.rs
fmt.rs Debug print char 0 as '\0' rather than '\u{0}' 2022-03-27 04:49:10 -07:00
heap.rs Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
lib.rs stabilize const_ptr_offset 2022-02-13 15:26:14 +08:00
linked_list.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
rc.rs Add Weak may_dangle tests 2021-05-20 19:42:29 -07:00
slice.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
str.rs Debug print char 0 as '\0' rather than '\u{0}' 2022-03-27 04:49:10 -07:00
string.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
vec_deque.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
vec.rs Add another assertion without into_iter 2022-03-25 16:57:59 +01:00