1 #![feature(allocator_api)]
5 use alloc::alloc::Global;
6 use std::alloc::{AllocRef, Layout};
8 // error-pattern: incorrect alloc info: expected size 2 and align 1, got size 1 and align 1
12 let x = Global.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap().0;
13 Global.realloc(x, Layout::from_size_align_unchecked(2, 1), 1).unwrap();