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
In order to tell dropck that we do own values of type T, and therefore may drop some T's when we drop, we must add an extra PhantomData saying exactly that
Will compile and Vec<T> can be used and dropped without any problem. So, what's the point of PhantomData there ? unless I implement Drop on Vec the code with or without PhantomData will compile just fine!
The text was updated successfully, but these errors were encountered:
In the book:
however:
Will compile and
Vec<T>
can be used and dropped without any problem. So, what's the point of PhantomData there ? unless I implementDrop
onVec
the code with or withoutPhantomData
will compile just fine!The text was updated successfully, but these errors were encountered: