about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-10-18 12:29:13 +0200
committerMara Bos <m-ou.se@m-ou.se>2020-10-18 12:29:13 +0200
commit16201da6a4ff613d00ca3680c43cbb1b52f60cf1 (patch)
tree9afbcb52d62e9d4a288c6a1281f096ef017f71ef
parent01b0aff1df1dd5ee7c60e8fbeff15cc3edaa3208 (diff)
downloadrust-16201da6a4ff613d00ca3680c43cbb1b52f60cf1.tar.gz
rust-16201da6a4ff613d00ca3680c43cbb1b52f60cf1.zip
Rename panic_box to panic_any.
-rw-r--r--library/std/src/panic.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs
index 06ce66c10f7..9a756e4bbb4 100644
--- a/library/std/src/panic.rs
+++ b/library/std/src/panic.rs
@@ -23,17 +23,17 @@ pub use crate::panicking::{set_hook, take_hook};
 #[stable(feature = "panic_hooks", since = "1.10.0")]
 pub use core::panic::{Location, PanicInfo};
 
-/// Panic the current thread, with the given payload as the panic message.
+/// Panic the current thread with the given message as the panic payload.
 ///
-/// This supports an arbitrary panic payload, instead of just (formatted) strings.
+/// The message can be of any (`Any + Send`) type, not just strings.
 ///
-/// The message is attached as a `Box<'static + Any + Send>`, which can be
-/// accessed using [`PanicInfo::payload`].
+/// The message is wrapped in a `Box<'static + Any + Send>`, which can be
+/// accessed later using [`PanicInfo::payload`].
 ///
 /// See the [`panic!`] macro for more information about panicking.
 #[unstable(feature = "panic_box", issue = "none")]
 #[inline]
-pub fn panic_box<M: Any + Send>(msg: M) -> ! {
+pub fn panic_any<M: Any + Send>(msg: M) -> ! {
     crate::panicking::begin_panic(msg);
 }