about summary refs log tree commit diff
path: root/library/alloc/src/vec/mod.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-21 12:28:53 +0100
committerGitHub <noreply@github.com>2024-01-21 12:28:53 +0100
commit4a941d384d4b0661f2279aa5eaf1fbb8d85ad31a (patch)
treeb7a455405bbd3d1ad5ad3e542dc83f77e77fecb8 /library/alloc/src/vec/mod.rs
parenta72d6c114b65ac07394b078b550cf788f7a843de (diff)
parent5796b3c16733f3d9cb2f3476ed1dc0fe05b14e25 (diff)
downloadrust-4a941d384d4b0661f2279aa5eaf1fbb8d85ad31a.tar.gz
rust-4a941d384d4b0661f2279aa5eaf1fbb8d85ad31a.zip
Rollup merge of #120145 - the8472:fix-inplace-dest-drop, r=cuviper
fix: Drop guard was deallocating with the incorrect size

InPlaceDstBufDrop holds onto the allocation before the shrinking happens which means it must deallocate the destination elements but the source allocation.

Thanks `@cuviper` for spotting this.
Diffstat (limited to 'library/alloc/src/vec/mod.rs')
-rw-r--r--library/alloc/src/vec/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 35ea97bfe60..48daec15228 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -123,7 +123,7 @@ use self::set_len_on_drop::SetLenOnDrop;
 mod set_len_on_drop;
 
 #[cfg(not(no_global_oom_handling))]
-use self::in_place_drop::{InPlaceDrop, InPlaceDstBufDrop};
+use self::in_place_drop::{InPlaceDrop, InPlaceDstDataSrcBufDrop};
 
 #[cfg(not(no_global_oom_handling))]
 mod in_place_drop;