More alloc docs tweaks
This commit is contained in:
parent
9dcb64f346
commit
7f0d54d988
2 changed files with 27 additions and 3 deletions
|
@ -184,8 +184,10 @@ pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
|
|||
///
|
||||
/// The default behavior of this function is to print a message to standard error
|
||||
/// and abort the process.
|
||||
/// It can be replaced with [`std::alloc::set_oom_hook`]
|
||||
/// and [`std::alloc::take_oom_hook`].
|
||||
/// It can be replaced with [`set_oom_hook`] and [`take_oom_hook`].
|
||||
///
|
||||
/// [`set_oom_hook`]: ../../std/alloc/fn.set_oom_hook.html
|
||||
/// [`take_oom_hook`]: ../../std/alloc/fn.take_oom_hook.html
|
||||
#[stable(feature = "global_alloc", since = "1.28.0")]
|
||||
#[rustc_allocator_nounwind]
|
||||
pub fn oom(layout: Layout) -> ! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue