2.8.1. Problems with Explicit Destructors

Problems arise when you add an explicit destructor:

When a type implements Drop, you cannot move any of its fields out inside the destructor. That is because after the explicit destructor runs, drop() will still be called, and it takes &mut self, which requires all parts of self to remain in place.

Drop takes &mut self rather than self, so Drop cannot simply call the explicit destructor and ignore its result, because Drop does not own self

Based on the example from the previous article, if we add both a Drop implementation and a close method: