]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/regions/regions-mock-codegen.rs
Remove alignment from `MemoryBlock`
[rust.git] / src / test / ui / regions / regions-mock-codegen.rs
index b9bd2988b6ee7c2554a0b58ec468fe7ef10ce5e3..148b0a86a05890e16f8940c764a3ac7576375d49 100644 (file)
@@ -4,7 +4,7 @@
 // pretty-expanded FIXME #23616
 #![feature(allocator_api)]
 
-use std::alloc::{handle_alloc_error, AllocInit, AllocRef, Global, Layout, MemoryBlock};
+use std::alloc::{handle_alloc_error, AllocInit, AllocRef, Global, Layout};
 use std::ptr::NonNull;
 
 struct arena(());
@@ -40,10 +40,7 @@ fn g(fcx: &Fcx) {
     let bcx = Bcx { fcx };
     let bcx2 = h(&bcx);
     unsafe {
-        Global.dealloc(MemoryBlock::new(
-            NonNull::new_unchecked(bcx2 as *const _ as *mut _),
-            Layout::new::<Bcx>(),
-        ));
+        Global.dealloc(NonNull::new_unchecked(bcx2 as *const _ as *mut _), Layout::new::<Bcx>());
     }
 }