Skip to content

Commit f738669

Browse files
committed
Clarify safety of PanicInfo::can_unwind
1 parent c4f2d21 commit f738669

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/panic/panic_info.rs

+4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ impl<'a> PanicInfo<'a> {
136136
/// This is true for most kinds of panics with the exception of panics
137137
/// caused by trying to unwind out of a `Drop` implementation or a function
138138
/// whose ABI does not support unwinding.
139+
///
140+
/// It is safe for a panic handler to unwind even when this function returns
141+
/// true, however this will simply cause the panic handler to be called
142+
/// again.
139143
#[must_use]
140144
#[unstable(feature = "panic_can_unwind", issue = "92988")]
141145
pub fn can_unwind(&self) -> bool {

0 commit comments

Comments
 (0)