Skip to content

Commit 151d820

Browse files
committed
Rename Alloc to AllocRef
Required to land rust-lang/rust#68529. Please see that PR for details. The CI is expected to fail until the PR is landed.
1 parent 8340358 commit 151d820

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/run-pass/heap_allocator.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#![feature(allocator_api)]
22

33
use std::ptr::NonNull;
4-
use std::alloc::{Global, Alloc, Layout, System};
4+
use std::alloc::{Global, AllocRef, Layout, System};
55
use std::slice;
66

7-
fn check_alloc<T: Alloc>(mut allocator: T) { unsafe {
7+
fn check_alloc<T: AllocRef>(mut allocator: T) { unsafe {
88
for &align in &[4, 8, 16, 32] {
99
let layout = Layout::from_size_align(20, align).unwrap();
1010

@@ -40,7 +40,7 @@ fn check_alloc<T: Alloc>(mut allocator: T) { unsafe {
4040
}
4141
} }
4242

43-
fn check_align_requests<T: Alloc>(mut allocator: T) {
43+
fn check_align_requests<T: AllocRef>(mut allocator: T) {
4444
for &size in &[2, 8, 64] { // size less than and bigger than alignment
4545
for &align in &[4, 8, 16, 32] { // Be sure to cover less than and bigger than `MIN_ALIGN` for all architectures
4646
let iterations = 32;

0 commit comments

Comments
 (0)