about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-04-02 19:57:31 +0200
committerGitHub <noreply@github.com>2021-04-02 19:57:31 +0200
commit542f441d445026d0996eebee9ddddee98f5dc3e5 (patch)
tree0873cca9285235dd23dcb3d3e48132bed9a18eb4 /compiler/rustc_codegen_llvm/src
parent31f532092c4172ba2f3764d3ef63a790ea1387e3 (diff)
parent421f5d282a51e130d3ca7c4524d8ad6753437da9 (diff)
downloadrust-542f441d445026d0996eebee9ddddee98f5dc3e5.tar.gz
rust-542f441d445026d0996eebee9ddddee98f5dc3e5.zip
Rollup merge of #83629 - the8472:fix-inplace-panic-on-drop, r=m-ou-se
Fix double-drop in `Vec::from_iter(vec.into_iter())` specialization when items drop during panic

This fixes the double-drop but it leaves a behavioral difference compared to the default implementation intact: In the default implementation the source and the destination vec are separate objects, so they get dropped separately. Here they share an allocation and the latter only exists as a pointer into the former. So if dropping the former panics then this fix will leak more items than the default implementation would. Is this acceptable or should the specialization also mimic the default implementation's drops-during-panic behavior?

Fixes #83618

`@rustbot` label T-libs-impl
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions