about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/panic.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs
index 51228cc9907..d5566caa369 100644
--- a/library/std/src/panic.rs
+++ b/library/std/src/panic.rs
@@ -63,6 +63,13 @@ impl<'a> PanicHookInfo<'a> {
     ///
     /// This will commonly, but not always, be a `&'static str` or [`String`].
     ///
+    /// A invocation of the `panic!()` macro in Rust 2021 or later will always result in a
+    /// panic payload of type `&'static str` or `String`.
+    ///
+    /// Only an invocation of [`panic_any`]
+    /// (or, in Rust 2018 and earlier, `panic!(x)` where `x` is something other than a string)
+    /// can result in a panic payload other than a `&'static str` or `String`.
+    ///
     /// [`String`]: ../../std/string/struct.String.html
     ///
     /// # Examples