about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/example.rs
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-31 00:26:32 +0200
committerGitHub <noreply@github.com>2022-03-31 00:26:32 +0200
commitd6c959c680df8e3a68932e42ed919f5664669cc7 (patch)
tree367e984f66e6d0b2253cb0a546a9f2b0a757e2c9 /compiler/rustc_codegen_gcc/example/example.rs
parent86388f617178875af0b6a585479efa4f09abd630 (diff)
parentd9a438dc73de6ff146ae3e6bc4050b7cea41b09e (diff)
downloadrust-d6c959c680df8e3a68932e42ed919f5664669cc7.tar.gz
rust-d6c959c680df8e3a68932e42ed919f5664669cc7.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/example.rs')
0 files changed, 0 insertions, 0 deletions