about summary refs log tree commit diff
path: root/library/alloc/tests/heap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/tests/heap.rs')
-rw-r--r--library/alloc/tests/heap.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/tests/heap.rs b/library/alloc/tests/heap.rs
index a7239a4b14f..246b341eeb3 100644
--- a/library/alloc/tests/heap.rs
+++ b/library/alloc/tests/heap.rs
@@ -1,4 +1,4 @@
-use std::alloc::{AllocRef, Global, Layout, System};
+use std::alloc::{Allocator, Global, Layout, System};
 
 /// Issue #45955 and #62251.
 #[test]
@@ -11,7 +11,7 @@ fn std_heap_overaligned_request() {
     check_overalign_requests(Global)
 }
 
-fn check_overalign_requests<T: AllocRef>(allocator: T) {
+fn check_overalign_requests<T: Allocator>(allocator: T) {
     for &align in &[4, 8, 16, 32] {
         // less than and bigger than `MIN_ALIGN`
         for &size in &[align / 2, align - 1] {
@@ -20,7 +20,7 @@ fn check_overalign_requests<T: AllocRef>(allocator: T) {
             unsafe {
                 let pointers: Vec<_> = (0..iterations)
                     .map(|_| {
-                        allocator.alloc(Layout::from_size_align(size, align).unwrap()).unwrap()
+                        allocator.allocate(Layout::from_size_align(size, align).unwrap()).unwrap()
                     })
                     .collect();
                 for &ptr in &pointers {
@@ -33,7 +33,7 @@ fn check_overalign_requests<T: AllocRef>(allocator: T) {
 
                 // Clean up
                 for &ptr in &pointers {
-                    allocator.dealloc(
+                    allocator.deallocate(
                         ptr.as_non_null_ptr(),
                         Layout::from_size_align(size, align).unwrap(),
                     )