diff options
| author | bors <bors@rust-lang.org> | 2013-12-17 05:11:41 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-12-17 05:11:41 -0800 |
| commit | fb6ec38352b56250045f7450af4eb2af1a019dcd (patch) | |
| tree | 1f157ebe8c90d727988db5d1068a4415392198d9 /src/libstd/vec.rs | |
| parent | 793eb1d38d6549e26fbf3014604c5c81e4b18c4f (diff) | |
| parent | 664c9af1e968ed5734425574e9d122014679a739 (diff) | |
| download | rust-fb6ec38352b56250045f7450af4eb2af1a019dcd.tar.gz rust-fb6ec38352b56250045f7450af4eb2af1a019dcd.zip | |
auto merge of #10998 : thestinger/rust/iter, r=alexcrichton
Diffstat (limited to 'src/libstd/vec.rs')
| -rw-r--r-- | src/libstd/vec.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 25a6429d851..65be214c14e 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -2673,11 +2673,9 @@ impl<T> DoubleEndedIterator<T> for MoveIterator<T> { #[unsafe_destructor] impl<T> Drop for MoveIterator<T> { fn drop(&mut self) { + // destroy the remaining elements + for _x in *self {} unsafe { - // destroy the remaining elements - for x in self.iter { - ptr::read_ptr(x); - } if owns_managed::<T>() { local_free(self.allocation as *u8 as *c_char) } else { |
