File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,17 @@ pub use crate::panicking::{set_hook, take_hook};
23
23
#[ stable( feature = "panic_hooks" , since = "1.10.0" ) ]
24
24
pub use core:: panic:: { Location , PanicInfo } ;
25
25
26
- /// Panic the current thread, with the given payload as the panic message .
26
+ /// Panic the current thread with the given message as the panic payload .
27
27
///
28
- /// This supports an arbitrary panic payload, instead of just (formatted) strings.
28
+ /// The message can be of any (`Any + Send`) type, not just strings.
29
29
///
30
- /// The message is attached as a `Box<'static + Any + Send>`, which can be
31
- /// accessed using [`PanicInfo::payload`].
30
+ /// The message is wrapped in a `Box<'static + Any + Send>`, which can be
31
+ /// accessed later using [`PanicInfo::payload`].
32
32
///
33
33
/// See the [`panic!`] macro for more information about panicking.
34
34
#[ unstable( feature = "panic_box" , issue = "none" ) ]
35
35
#[ inline]
36
- pub fn panic_box < M : Any + Send > ( msg : M ) -> ! {
36
+ pub fn panic_any < M : Any + Send > ( msg : M ) -> ! {
37
37
crate :: panicking:: begin_panic ( msg) ;
38
38
}
39
39
You can’t perform that action at this time.
0 commit comments