You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
dadepo
changed the title
Box implementation for Drop does no customisation. The compiler is responsible for that!
Box implementation for Drop does no customization. Seems the compiler is responsible for that
Feb 15, 2020
In Chapter 15, section 3 you have
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:
So I do not think the quoted snippet from the book is technically correct.
The text was updated successfully, but these errors were encountered: