|
|
|
|
|
by kibwen
4269 days ago
|
|
The names are a bit confusing here, and I might petition to change them. The `drop` here is just a simple library function and isn't technically related to the `Drop` trait, which is implemented with magical compiler pixie dust and allows you to define a destructor via a `.drop` method. Anything that goes out of scope has this `.drop` method called automagically. You're correct in that if you were calling `x.drop()` explicitly, you would need to have a `Drop` bound on `T`. |
|