File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,15 @@ pub trait Drop {
99
99
/// Given that a [`panic!`] will call `drop` as it unwinds, any [`panic!`]
100
100
/// in a `drop` implementation will likely abort.
101
101
///
102
+ /// Note that even if this panics, the value is considered to be dropped;
103
+ /// you must not cause `drop` to be called again. This is normally automatically
104
+ /// handled by the compiler, but when using unsafe code, can sometimes occur
105
+ /// unintentionally, particularly when using [`std::ptr::drop_in_place`].
106
+ ///
102
107
/// [E0040]: ../../error-index.html#E0040
103
108
/// [`panic!`]: ../macro.panic.html
104
109
/// [`std::mem::drop`]: ../../std/mem/fn.drop.html
110
+ /// [`std::ptr::drop_in_place`]: ../../std/ptr/fn.drop_in_place.html
105
111
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
106
112
fn drop ( & mut self ) ;
107
113
}
You can’t perform that action at this time.
0 commit comments