In Chapter 15, section 3 you have
For example, Box customizes Drop to deallocate the space on the heap that the box points to
source: https://doc.rust-lang.org/book/ch15-03-drop.html
I looked into the implementation of Drop for Box with the intention of seeing how such an implementation would look like and this is what I found:
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<#[may_dangle] T: ?Sized> Drop for Box<T> {
fn drop(&mut self) {
// FIXME: Do nothing, drop is currently performed by compiler.
}
}
So I do not think the quoted snippet from the book is technically correct.