We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 84157db + 3385fba commit f8c2d57Copy full SHA for f8c2d57
src/libcore/ops.rs
@@ -95,6 +95,16 @@ use fmt;
95
#[stable(feature = "rust1", since = "1.0.0")]
96
pub trait Drop {
97
/// A method called when the value goes out of scope.
98
+ ///
99
+ /// When this method has been called, `self` has not yet been deallocated.
100
+ /// If it were, `self` would be a dangling reference.
101
102
+ /// After this function is over, the memory of `self` will be deallocated.
103
104
+ /// # Panics
105
106
+ /// Given that a `panic!` will call `drop()` as it unwinds, any `panic!` in
107
+ /// a `drop()` implementation will likely abort.
108
109
fn drop(&mut self);
110
}
0 commit comments