From f738669b636eae466fef00f62af5d393169c676d Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Sun, 30 Jan 2022 21:33:51 +0100 Subject: [PATCH] Clarify safety of PanicInfo::can_unwind --- library/core/src/panic/panic_info.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/panic/panic_info.rs b/library/core/src/panic/panic_info.rs index 405224f8fb0b0..be8598fae09d7 100644 --- a/library/core/src/panic/panic_info.rs +++ b/library/core/src/panic/panic_info.rs @@ -136,6 +136,10 @@ impl<'a> PanicInfo<'a> { /// This is true for most kinds of panics with the exception of panics /// caused by trying to unwind out of a `Drop` implementation or a function /// whose ABI does not support unwinding. + /// + /// It is safe for a panic handler to unwind even when this function returns + /// true, however this will simply cause the panic handler to be called + /// again. #[must_use] #[unstable(feature = "panic_can_unwind", issue = "92988")] pub fn can_unwind(&self) -> bool {