about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-01-19 17:34:20 +0000
committerbors <bors@rust-lang.org>2016-01-19 17:34:20 +0000
commitf8c2d57f4c69ff8972178ee21e99d40a8f777d2c (patch)
tree8e2696ba9a98a202a161e674013383aa11b75fb4
parent84157dbd4c7420e3e5b4dd22e4ff244889aa6275 (diff)
parent3385fba264fccba07545314880788281e91ca34c (diff)
downloadrust-f8c2d57f4c69ff8972178ee21e99d40a8f777d2c.tar.gz
rust-f8c2d57f4c69ff8972178ee21e99d40a8f777d2c.zip
Auto merge of #30696 - steveklabnik:gh30655, r=brson
Fixes #30655
-rw-r--r--src/libcore/ops.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index 6144f97b130..d1c5b175bb0 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -95,6 +95,16 @@ use fmt;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Drop {
     /// A method called when the value goes out of scope.
+    ///
+    /// When this method has been called, `self` has not yet been deallocated.
+    /// If it were, `self` would be a dangling reference.
+    ///
+    /// After this function is over, the memory of `self` will be deallocated.
+    ///
+    /// # Panics
+    ///
+    /// Given that a `panic!` will call `drop()` as it unwinds, any `panic!` in
+    /// a `drop()` implementation will likely abort.
     #[stable(feature = "rust1", since = "1.0.0")]
     fn drop(&mut self);
 }