about summary refs log tree commit diff
path: root/src/test/ui/allocator/xcrate-use.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/allocator/xcrate-use.rs')
-rw-r--r--src/test/ui/allocator/xcrate-use.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/ui/allocator/xcrate-use.rs b/src/test/ui/allocator/xcrate-use.rs
index a1446b3664d..edd4df75e8b 100644
--- a/src/test/ui/allocator/xcrate-use.rs
+++ b/src/test/ui/allocator/xcrate-use.rs
@@ -10,7 +10,7 @@
 extern crate custom;
 extern crate helper;
 
-use std::alloc::{AllocRef, Global, Layout, System};
+use std::alloc::{Allocator, Global, Layout, System};
 use std::sync::atomic::{AtomicUsize, Ordering};
 
 #[global_allocator]
@@ -21,16 +21,16 @@ fn main() {
         let n = GLOBAL.0.load(Ordering::SeqCst);
         let layout = Layout::from_size_align(4, 2).unwrap();
 
-        let memory = Global.alloc(layout.clone()).unwrap();
+        let memory = Global.allocate(layout.clone()).unwrap();
         helper::work_with(&memory);
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 1);
-        Global.dealloc(memory.as_non_null_ptr(), layout);
+        Global.deallocate(memory.as_non_null_ptr(), layout);
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
 
-        let memory = System.alloc(layout.clone()).unwrap();
+        let memory = System.allocate(layout.clone()).unwrap();
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
         helper::work_with(&memory);
-        System.dealloc(memory.as_non_null_ptr(), layout);
+        System.deallocate(memory.as_non_null_ptr(), layout);
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
     }
 }