-use std::alloc::{Alloc, Global, Layout, System};
+use std::alloc::{AllocRef, Global, Layout, System};
/// Issue #45955 and #62251.
#[test]
check_overalign_requests(Global)
}
-fn check_overalign_requests<T: Alloc>(mut allocator: T) {
+fn check_overalign_requests<T: AllocRef>(mut allocator: T) {
for &align in &[4, 8, 16, 32] {
// less than and bigger than `MIN_ALIGN`
for &size in &[align / 2, align - 1] {
unsafe {
let pointers: Vec<_> = (0..iterations)
.map(|_| {
- allocator.alloc(Layout::from_size_align(size, align).unwrap()).unwrap()
+ allocator.alloc(Layout::from_size_align(size, align).unwrap()).unwrap().0
})
.collect();
for &ptr in &pointers {