Description goes like this:
Disposes of a value.
This function can be used to destroy any value
by allowing drop to take ownership of its argument.
Sounds powerful Now, my understanding was I could do something like this:
let x = 3; //any value
mem::drop(x); //take ownership
But as it turns out, x is still alive:
But looking at the source, it’s only an empty function.
So, it would work for vector, for example, but doesn’t work for primitive/copy types.
The description implies some kind of magic is happening behind the scene.
Isn’t the description a bit misleading? Or something is yet to be implemented?