]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/arena.rs
bump smallvec to 1.0
[rust.git] / src / librustc / arena.rs
index 3daf0fc9df7a06606cd090f84ca7d1d29cdcbaf9..9b13a910c617453f08437b2284b47dbe4ad3ecc9 100644 (file)
@@ -304,7 +304,7 @@ unsafe fn alloc_from_iter<T, I: IntoIterator<Item = T>>(&self, iter: I) -> &mut
         // Move the content to the arena by copying it and then forgetting
         // the content of the SmallVec
         vec.as_ptr().copy_to_nonoverlapping(start_ptr, len);
-        mem::forget(vec.drain());
+        mem::forget(vec.drain(..));
 
         // Record the destructors after doing the allocation as that may panic
         // and would cause `object`'s destuctor to run twice if it was recorded before