about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/allocator-alloc-one.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/test/ui/allocator-alloc-one.rs b/src/test/ui/allocator-alloc-one.rs
deleted file mode 100644
index b821a2c5939..00000000000
--- a/src/test/ui/allocator-alloc-one.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// run-pass
-
-#![allow(stable_features)]
-
-#![feature(allocator_api, nonnull)]
-
-use std::alloc::{AllocRef, Global, Layout, handle_alloc_error};
-
-fn main() {
-    unsafe {
-        let ptr = Global.alloc_one::<i32>().unwrap_or_else(|_| {
-            handle_alloc_error(Layout::new::<i32>())
-        });
-        *ptr.as_ptr() = 4;
-        assert_eq!(*ptr.as_ptr(), 4);
-        Global.dealloc_one(ptr);
-    }
-}