From 0067524a8a9a33c46ed6068b61e10e9be9d7e650 Mon Sep 17 00:00:00 2001 From: c Date: Sat, 29 Nov 2025 14:49:27 +0100 Subject: [PATCH] doc: panic::{take_hook, set_hook, update_hook} abort when called from panicking thread --- library/std/src/panicking.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs index a4a974d0447b8..0dba4250d8015 100644 --- a/library/std/src/panicking.rs +++ b/library/std/src/panicking.rs @@ -121,9 +121,9 @@ static HOOK: RwLock = RwLock::new(Hook::Default); /// /// The panic hook is a global resource. /// -/// # Panics +/// # Aborts /// -/// Panics if called from a panicking thread. +/// Aborts if called from a panicking thread. /// /// # Examples /// @@ -158,9 +158,9 @@ pub fn set_hook(hook: Box) + 'static + Sync + Send>) { /// /// If the default hook is registered it will be returned, but remain registered. /// -/// # Panics +/// # Aborts /// -/// Panics if called from a panicking thread. +/// Aborts if called from a panicking thread. /// /// # Examples /// @@ -193,9 +193,9 @@ pub fn take_hook() -> Box) + 'static + Sync + Send> { /// [`take_hook`]: ./fn.take_hook.html /// [`set_hook`]: ./fn.set_hook.html /// -/// # Panics +/// # Aborts /// -/// Panics if called from a panicking thread. +/// Aborts if called from a panicking thread. /// /// # Examples ///