3 #![allow(non_camel_case_types)]
4 // pretty-expanded FIXME #23616
5 #![feature(allocator_api)]
7 use std::alloc::{handle_alloc_error, AllocRef, Global, Layout};
25 fn alloc(_bcx: &arena) -> &Bcx<'_> {
27 let layout = Layout::new::<Bcx>();
28 let ptr = Global.alloc(layout).unwrap_or_else(|_| handle_alloc_error(layout));
29 &*(ptr.as_ptr() as *const _)
33 fn h<'a>(bcx: &'a Bcx<'a>) -> &'a Bcx<'a> {
34 return alloc(bcx.fcx.arena);
38 let bcx = Bcx { fcx };
41 Global.dealloc(NonNull::new_unchecked(bcx2 as *const _ as *mut _), Layout::new::<Bcx>());
47 let fcx = Fcx { arena: &a, ccx };
52 let ccx = Ccx { x: 0 };