catch_panic: warn about panicking payload drop

This commit is contained in:
Ralf Jung 2024-03-31 11:54:16 +02:00
parent c93b17d6d2
commit 42972f52de

View File

@ -126,6 +126,9 @@ impl<K, V, S> UnwindSafe for collections::HashMap<K, V, S>
/// Also note that unwinding into Rust code with a foreign exception (e.g.
/// an exception thrown from C++ code) is undefined behavior.
///
/// Finally, be **careful in how you drop the result of this function**.
/// If it is `Err`, it contains the panic payload, and dropping that may in turn panic!
///
/// # Examples
///
/// ```