]> git.lizzy.rs Git - rust.git/commit
Document that ManuallyDrop::drop should not called more than once
authorAaron Hill <aa1ronham@gmail.com>
Thu, 4 Jul 2019 01:45:17 +0000 (21:45 -0400)
committerGitHub <noreply@github.com>
Thu, 4 Jul 2019 01:45:17 +0000 (21:45 -0400)
commitaf96b1df1da916561547dd30b3187b30308d6843
tree8e047fd01265430cf2d9114077698a26ca4349b2
parent088b987307b91612ab164026e1dcdd0129fdb62b
Document that ManuallyDrop::drop should not called more than once

Double dropping is unsound (e.g. https://github.com/rust-lang/rust/issues/60977). This commit documents the fact that `ManuallyDrop::drop` should not be called multiple times on the same instance, as it might not be immediately obvious that this counts as a use of uninitialized data.
src/libcore/mem/manually_drop.rs