about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-03-24 11:45:38 +0100
committerTim Diekmann <tim.diekmann@3dvision.de>2020-03-26 17:10:54 +0100
commit56cbf2f22aeb6448acd7eb49e9b2554c80bdbf79 (patch)
treeaf24a0972cda1bd07560e36c5edd5aa14b53fc7d /src/liballoc/tests
parent2fbb07525e2f07a815e780a4268b11916248b5a9 (diff)
downloadrust-56cbf2f22aeb6448acd7eb49e9b2554c80bdbf79.tar.gz
rust-56cbf2f22aeb6448acd7eb49e9b2554c80bdbf79.zip
Overhaul of the `AllocRef` trait to match allocator-wg's latest consens
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/heap.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/liballoc/tests/heap.rs b/src/liballoc/tests/heap.rs
index d159126f426..690ae84a5df 100644
--- a/src/liballoc/tests/heap.rs
+++ b/src/liballoc/tests/heap.rs
@@ -1,4 +1,4 @@
-use std::alloc::{AllocRef, Global, Layout, System};
+use std::alloc::{AllocInit, AllocRef, Global, Layout, System};
 
 /// Issue #45955 and #62251.
 #[test]
@@ -20,7 +20,13 @@ fn check_overalign_requests<T: AllocRef>(mut allocator: T) {
             unsafe {
                 let pointers: Vec<_> = (0..iterations)
                     .map(|_| {
-                        allocator.alloc(Layout::from_size_align(size, align).unwrap()).unwrap().0
+                        allocator
+                            .alloc(
+                                Layout::from_size_align(size, align).unwrap(),
+                                AllocInit::Uninitialized,
+                            )
+                            .unwrap()
+                            .0
                     })
                     .collect();
                 for &ptr in &pointers {