about summary refs log tree commit diff
path: root/src/libcore/alloc.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-04-04 18:57:48 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-04-12 22:53:21 +0200
commiteae0d468932660ca383e35bb9d8b0cb4943a82ae (patch)
tree818c14771c58c3fe97bd5d6c18bb94e30fe2064e /src/libcore/alloc.rs
parent96c9d225a9667bc5ffcbc1594d44c29b201e999c (diff)
downloadrust-eae0d468932660ca383e35bb9d8b0cb4943a82ae.tar.gz
rust-eae0d468932660ca383e35bb9d8b0cb4943a82ae.zip
Restore Global.oom() functionality
… now that #[global_allocator] does not define a symbol for it
Diffstat (limited to 'src/libcore/alloc.rs')
-rw-r--r--src/libcore/alloc.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs
index cfa7df06a40..7334f986f2b 100644
--- a/src/libcore/alloc.rs
+++ b/src/libcore/alloc.rs
@@ -438,6 +438,10 @@ pub unsafe trait GlobalAlloc {
         }
         new_ptr
     }
+
+    fn oom(&self) -> ! {
+        unsafe { ::intrinsics::abort() }
+    }
 }
 
 /// An implementation of `Alloc` can allocate, reallocate, and