From 56cbf2f22aeb6448acd7eb49e9b2554c80bdbf79 Mon Sep 17 00:00:00 2001 From: Tim Diekmann Date: Tue, 24 Mar 2020 11:45:38 +0100 Subject: Overhaul of the `AllocRef` trait to match allocator-wg's latest consens --- src/liballoc/tests/heap.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/liballoc/tests') 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(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 { -- cgit 1.4.1-3-g733a5