summaryrefslogtreecommitdiffstats
path: root/vendor/allocator-api2/src
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/allocator-api2/src')
-rw-r--r--vendor/allocator-api2/src/stable/boxed.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/vendor/allocator-api2/src/stable/boxed.rs b/vendor/allocator-api2/src/stable/boxed.rs
index 3c342c54a..7a0c03318 100644
--- a/vendor/allocator-api2/src/stable/boxed.rs
+++ b/vendor/allocator-api2/src/stable/boxed.rs
@@ -1183,6 +1183,7 @@ impl<T: ?Sized, A: Allocator> Drop for Box<T, A> {
fn drop(&mut self) {
let layout = Layout::for_value::<T>(&**self);
unsafe {
+ ptr::drop_in_place(self.0.as_mut());
self.1.deallocate(self.0.cast(), layout);
}
}