11use super :: Builder ;
22use crate :: any:: Any ;
33use crate :: mem;
4+ use crate :: panic:: panic_any;
45use crate :: result;
56use crate :: sync:: {
67 mpsc:: { channel, Sender } ,
@@ -183,7 +184,7 @@ fn test_simple_newsched_spawn() {
183184}
184185
185186#[ test]
186- fn test_try_panic_message_static_str ( ) {
187+ fn test_try_panic_message_string_literal ( ) {
187188 match thread:: spawn ( move || {
188189 panic ! ( "static string" ) ;
189190 } )
@@ -199,9 +200,9 @@ fn test_try_panic_message_static_str() {
199200}
200201
201202#[ test]
202- fn test_try_panic_message_owned_str ( ) {
203+ fn test_try_panic_any_message_owned_str ( ) {
203204 match thread:: spawn ( move || {
204- panic ! ( "owned string" . to_string( ) ) ;
205+ panic_any ( "owned string" . to_string ( ) ) ;
205206 } )
206207 . join ( )
207208 {
@@ -215,9 +216,9 @@ fn test_try_panic_message_owned_str() {
215216}
216217
217218#[ test]
218- fn test_try_panic_message_any ( ) {
219+ fn test_try_panic_any_message_any ( ) {
219220 match thread:: spawn ( move || {
220- panic ! ( box 413u16 as Box <dyn Any + Send >) ;
221+ panic_any ( box 413u16 as Box < dyn Any + Send > ) ;
221222 } )
222223 . join ( )
223224 {
@@ -233,10 +234,10 @@ fn test_try_panic_message_any() {
233234}
234235
235236#[ test]
236- fn test_try_panic_message_unit_struct ( ) {
237+ fn test_try_panic_any_message_unit_struct ( ) {
237238 struct Juju ;
238239
239- match thread:: spawn ( move || panic ! ( Juju ) ) . join ( ) {
240+ match thread:: spawn ( move || panic_any ( Juju ) ) . join ( ) {
240241 Err ( ref e) if e. is :: < Juju > ( ) => { }
241242 Err ( _) | Ok ( ( ) ) => panic ! ( ) ,
242243 }
0 commit comments