]> git.lizzy.rs Git - rust.git/blobdiff - src/liballoc/tests/heap.rs
Remove alignment from `MemoryBlock`
[rust.git] / src / liballoc / tests / heap.rs
index 4b0d7bc1f449eb89d037b7705b3e51e068a7a428..709e8c148d506a9fac7d923d4bf916178313c577 100644 (file)
@@ -1,4 +1,4 @@
-use std::alloc::{AllocInit, AllocRef, Global, Layout, MemoryBlock, System};
+use std::alloc::{AllocInit, AllocRef, Global, Layout, System};
 
 /// Issue #45955 and #62251.
 #[test]
@@ -39,10 +39,7 @@ fn check_overalign_requests<T: AllocRef>(mut allocator: T) {
 
                 // Clean up
                 for &ptr in &pointers {
-                    allocator.dealloc(MemoryBlock::new(
-                        ptr,
-                        Layout::from_size_align(size, align).unwrap(),
-                    ))
+                    allocator.dealloc(ptr, Layout::from_size_align(size, align).unwrap())
                 }
             }
         }