Closed
Description
We should add a needs_drop<T>
intrinsic that is true if the type requires drop glue. We could then implement a vec::clear()
method that clears out the contents of a vector efficiently, avoiding the execution of drop glue if the vector has a type like [int]
. vec::slice()
is another example of where this might be useful.