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};
2323#[ stable( feature = "panic_hooks" , since = "1.10.0" ) ]
2424pub use core:: panic:: { Location , PanicInfo } ;
2525
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 .
2727///
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.
2929///
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`].
3232///
3333/// See the [`panic!`] macro for more information about panicking.
3434#[ unstable( feature = "panic_box" , issue = "none" ) ]
3535#[ inline]
36- pub fn panic_box < M : Any + Send > ( msg : M ) -> ! {
36+ pub fn panic_any < M : Any + Send > ( msg : M ) -> ! {
3737 crate :: panicking:: begin_panic ( msg) ;
3838}
3939
You can’t perform that action at this time.
0 commit comments