rust/library/alloc
Dylan DPC f24d00d8b3
Rollup merge of #101642 - SkiFire13:fix-inplace-collection-leak, r=the8472
Fix in-place collection leak when remaining element destructor panic

Fixes #101628

cc `@the8472`

I went for the drop guard route, placing it immediately before the `forget_allocation_drop_remaining` call and after the comment, as to signal they are closely related.

I also updated the test to check for the leak, though the only change really needed was removing the leak clean up for miri since now that's no longer leaked.
2022-10-04 16:11:01 +05:30
..
benches Optimized vec::IntoIter::next_chunk impl 2022-07-26 20:31:43 +02:00
src Rollup merge of #101642 - SkiFire13:fix-inplace-collection-leak, r=the8472 2022-10-04 16:11:01 +05:30
tests Rollup merge of #101642 - SkiFire13:fix-inplace-collection-leak, r=the8472 2022-10-04 16:11:01 +05:30
Cargo.toml Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00