diff options
| author | bors <bors@rust-lang.org> | 2020-05-18 11:11:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-18 11:11:19 +0000 |
| commit | 9e2a6a29ce82e4fc5decad86dab7911a38582438 (patch) | |
| tree | e6cb48e01bb939c8962a206153f763b960099ad0 /src/libstd/alloc.rs | |
| parent | d4bf05693c2c16e299f1adc279b54c37a8edef27 (diff) | |
| parent | 2764673dca6badb2ef89450bbdd84b19c317a9c7 (diff) | |
| download | rust-9e2a6a29ce82e4fc5decad86dab7911a38582438.tar.gz rust-9e2a6a29ce82e4fc5decad86dab7911a38582438.zip | |
Auto merge of #72289 - RalfJung:abort_internal, r=Mark-Simulacrum
abort_internal is safe `sys::abort_internal` is stably exposed as a safe function. Forward that assumption "inwards" to the `sys` module by making the function itself safe, too. This corresponds to what https://github.com/rust-lang/rust/pull/72204 did for the intrinsic. We should probably wait until that lands because some of the intrinsic calls in this PR might then need adjustments.
Diffstat (limited to 'src/libstd/alloc.rs')
| -rw-r--r-- | src/libstd/alloc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index 9840cfa4304..38d223d84e9 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -279,7 +279,7 @@ pub fn rust_oom(layout: Layout) -> ! { let hook: fn(Layout) = if hook.is_null() { default_alloc_error_hook } else { unsafe { mem::transmute(hook) } }; hook(layout); - unsafe { crate::sys::abort_internal() } + crate::process::abort() } #[cfg(not(test))] |
