diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index 37ec5bf1e40a0..8db365cd21d67 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -128,7 +128,7 @@ fn default_alloc_error_hook(layout: Layout) { #[cfg_attr(stage0, lang = "oom")] #[cfg_attr(not(stage0), alloc_error_handler)] #[unstable(feature = "alloc_internals", issue = "0")] -pub extern fn rust_oom(layout: Layout) -> ! { +pub fn rust_oom(layout: Layout) -> ! { let hook = HOOK.load(Ordering::SeqCst); let hook: fn(Layout) = if hook.is_null() { default_alloc_error_hook