diff options
| author | bors <bors@rust-lang.org> | 2014-06-17 02:51:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-17 02:51:53 +0000 |
| commit | 09967665eaa5ca3d259f0f59ef26c8d236bf47a7 (patch) | |
| tree | ae450abfecbe1fdec6f583cf7cf743c35663a4c7 /src/liballoc/lib.rs | |
| parent | cc30abbcad282634fb99089eb9297e7cc4f26729 (diff) | |
| parent | b9adb6c717627ab6dcc9298b79a8d44cfe2fc616 (diff) | |
| download | rust-09967665eaa5ca3d259f0f59ef26c8d236bf47a7.tar.gz rust-09967665eaa5ca3d259f0f59ef26c8d236bf47a7.zip | |
auto merge of #14955 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/liballoc/lib.rs')
| -rw-r--r-- | src/liballoc/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 0d8d25bff20..a947378f768 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -94,6 +94,14 @@ pub mod owned; pub mod arc; pub mod rc; +/// Common OOM routine used by liballoc +fn oom() -> ! { + // FIXME(#14674): This really needs to do something other than just abort + // here, but any printing done must be *guaranteed* to not + // allocate. + unsafe { core::intrinsics::abort() } +} + // FIXME(#14344): When linking liballoc with libstd, this library will be linked // as an rlib (it only exists as an rlib). It turns out that an // optimized standard library doesn't actually use *any* symbols |
