3 #![allow(non_camel_case_types)]
5 // pretty-expanded FIXME #23616
7 #![feature(allocator_api)]
9 use std::alloc::{AllocRef, Global, Layout, handle_alloc_error};
10 use std::ptr::NonNull;
27 fn alloc<'a>(_bcx : &'a arena) -> &'a Bcx<'a> {
29 let layout = Layout::new::<Bcx>();
30 let ptr = Global.alloc(layout).unwrap_or_else(|_| handle_alloc_error(layout));
31 &*(ptr.as_ptr() as *const _)
35 fn h<'a>(bcx : &'a Bcx<'a>) -> &'a Bcx<'a> {
36 return alloc(bcx.fcx.arena);
40 let bcx = Bcx { fcx: fcx };
43 Global.dealloc(NonNull::new_unchecked(bcx2 as *const _ as *mut _), Layout::new::<Bcx>());
49 let fcx = Fcx { arena: &a, ccx: ccx };
54 let ccx = Ccx { x: 0 };