diff options
| author | bors <bors@rust-lang.org> | 2022-03-31 00:29:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-31 00:29:54 +0000 |
| commit | a39ac5ae175e0f9f910b1800a430b488ec0f2105 (patch) | |
| tree | 1901e59455c2d055cf2d8642fccde25040ca35fb /library/alloc/src/vec/mod.rs | |
| parent | a40c595695bff3bfb373a8a3355ae4bd4ea64608 (diff) | |
| parent | d6c959c680df8e3a68932e42ed919f5664669cc7 (diff) | |
| download | rust-a39ac5ae175e0f9f910b1800a430b488ec0f2105.tar.gz rust-a39ac5ae175e0f9f910b1800a430b488ec0f2105.zip | |
Auto merge of #95501 - Dylan-DPC:rollup-arx6sdc, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #93901 (Stabilize native library modifier syntax and the `whole-archive` modifier specifically) - #94806 (Fix `cargo run tidy`) - #94869 (Add the generic_associated_types_extended feature) - #95011 (async: Give predictable name to binding generated from .await expressions.) - #95251 (Reduce max hash in raw strings from u16 to u8) - #95298 (Fix double drop of allocator in IntoIter impl of Vec) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/vec/mod.rs')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 1ca5ee55375..9773ec02337 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2579,7 +2579,7 @@ impl<T, A: Allocator> IntoIterator for Vec<T, A> { fn into_iter(self) -> IntoIter<T, A> { unsafe { let mut me = ManuallyDrop::new(self); - let alloc = ptr::read(me.allocator()); + let alloc = ManuallyDrop::new(ptr::read(me.allocator())); let begin = me.as_mut_ptr(); let end = if mem::size_of::<T>() == 0 { arith_offset(begin as *const i8, me.len() as isize) as *const T |
