]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/nomicon/src/vec-final.md
New upstream version 1.43.0+dfsg1
[rustc.git] / src / doc / nomicon / src / vec-final.md
index 66c8e8bcbaa558b80e0970e947c66a03b303e245..a858547eb199e8f363a626043cad79ef273cc26d 100644 (file)
@@ -9,7 +9,7 @@ use std::ptr::{Unique, NonNull, self};
 use std::mem;
 use std::ops::{Deref, DerefMut};
 use std::marker::PhantomData;
-use std::alloc::{Alloc, GlobalAlloc, Layout, Global, handle_alloc_error};
+use std::alloc::{AllocRef, GlobalAlloc, Layout, Global, handle_alloc_error};
 
 struct RawVec<T> {
     ptr: Unique<T>,
@@ -52,7 +52,7 @@ impl<T> RawVec<T> {
                     mem::align_of::<T>(),
                 ))
             }
-            let ptr = ptr.unwrap();
+            let (ptr, _) = ptr.unwrap();
 
             self.ptr = Unique::new_unchecked(ptr.as_ptr() as *mut _);
             self.cap = new_cap;