about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/heap.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/liballoc/tests/heap.rs b/src/liballoc/tests/heap.rs
index 690ae84a5df..4b0d7bc1f44 100644
--- a/src/liballoc/tests/heap.rs
+++ b/src/liballoc/tests/heap.rs
@@ -1,4 +1,4 @@
-use std::alloc::{AllocInit, AllocRef, Global, Layout, System};
+use std::alloc::{AllocInit, AllocRef, Global, Layout, MemoryBlock, System};
 
 /// Issue #45955 and #62251.
 #[test]
@@ -26,7 +26,7 @@ fn check_overalign_requests<T: AllocRef>(mut allocator: T) {
                                 AllocInit::Uninitialized,
                             )
                             .unwrap()
-                            .0
+                            .ptr()
                     })
                     .collect();
                 for &ptr in &pointers {
@@ -39,7 +39,10 @@ fn check_overalign_requests<T: AllocRef>(mut allocator: T) {
 
                 // Clean up
                 for &ptr in &pointers {
-                    allocator.dealloc(ptr, Layout::from_size_align(size, align).unwrap())
+                    allocator.dealloc(MemoryBlock::new(
+                        ptr,
+                        Layout::from_size_align(size, align).unwrap(),
+                    ))
                 }
             }
         }