about summary refs log tree commit diff
path: root/src/liballoc_system
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/liballoc_system
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/liballoc_system')
-rw-r--r--src/liballoc_system/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs
index 4516664e97c..c6507282b24 100644
--- a/src/liballoc_system/lib.rs
+++ b/src/liballoc_system/lib.rs
@@ -367,6 +367,7 @@ mod platform {
     }
 }
 
+#[inline]
 fn oom() -> ! {
     write_to_stderr("fatal runtime error: memory allocation failed");
     unsafe {
@@ -375,6 +376,7 @@ fn oom() -> ! {
 }
 
 #[cfg(any(unix, target_os = "redox"))]
+#[inline]
 fn write_to_stderr(s: &str) {
     extern crate libc;
 
@@ -386,6 +388,7 @@ fn write_to_stderr(s: &str) {
 }
 
 #[cfg(windows)]
+#[inline]
 fn write_to_stderr(s: &str) {
     use core::ptr;
 
@@ -421,4 +424,5 @@ fn write_to_stderr(s: &str) {
 }
 
 #[cfg(not(any(windows, unix, target_os = "redox")))]
+#[inline]
 fn write_to_stderr(_: &str) {}