diff options
| author | Ralf Jung <post@ralfj.de> | 2024-03-31 11:54:16 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-03-31 11:54:16 +0200 |
| commit | 42972f52de2aedbc8cc96a3f4b28c4330822aecd (patch) | |
| tree | 8390c1885a5efac13dcf74401a8217fb6df3e064 /library/std/src/panic.rs | |
| parent | c93b17d6d20a234f21e04804adef7b58a08dd9e4 (diff) | |
| download | rust-42972f52de2aedbc8cc96a3f4b28c4330822aecd.tar.gz rust-42972f52de2aedbc8cc96a3f4b28c4330822aecd.zip | |
catch_panic: warn about panicking payload drop
Diffstat (limited to 'library/std/src/panic.rs')
| -rw-r--r-- | library/std/src/panic.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index 3d576af681e..e63b46ab705 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -126,6 +126,9 @@ where /// 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 /// /// ``` |
