]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #51264 - glandium:oom, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 1 Jun 2018 14:05:57 +0000 (14:05 +0000)
committerbors <bors@rust-lang.org>
Fri, 1 Jun 2018 14:05:57 +0000 (14:05 +0000)
Make the OOM hook return `()` rather than `!`

Per discussion in https://github.com/rust-lang/rust/issues/51245#issuecomment-393651083

This allows more flexibility in what can be done with the API. This also
splits `rtabort!` into `dumb_print` happening in the default hook and
`abort_internal`, happening in the actual oom handler after calling the
hook. Registering an empty function thus makes the oom handler not print
anything but still abort.

Cc: @alexcrichton

Trivial merge