We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cf4432a + a516dbb commit f60a669Copy full SHA for f60a669
src/libcore/ops.rs
@@ -106,6 +106,13 @@ pub trait Drop {
106
///
107
/// After this function is over, the memory of `self` will be deallocated.
108
109
+ /// This function cannot be called explicitly. This is compiler error
110
+ /// [0040]. However, the [`std::mem::drop`] function in the prelude can be
111
+ /// used to call the argument's `Drop` implementation.
112
+ ///
113
+ /// [0040]: https://doc.rust-lang.org/error-index.html#E0040
114
+ /// [`std::mem::drop`]: https://doc.rust-lang.org/std/mem/fn.drop.html
115
116
/// # Panics
117
118
/// Given that a `panic!` will call `drop()` as it unwinds, any `panic!` in
0 commit comments