File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -310,15 +310,16 @@ impl Bridge<'_> {
310310 // NB. the server can't do this because it may use a different libstd.
311311 static HIDE_PANICS_DURING_EXPANSION : Once = Once :: new ( ) ;
312312 HIDE_PANICS_DURING_EXPANSION . call_once ( || {
313- panic:: update_hook ( move |prev, info| {
313+ let prev = panic:: take_hook ( ) ;
314+ panic:: set_hook ( Box :: new ( move |info| {
314315 let show = BridgeState :: with ( |state| match state {
315316 BridgeState :: NotConnected => true ,
316317 BridgeState :: Connected ( _) | BridgeState :: InUse => force_show_panics,
317318 } ) ;
318319 if show {
319320 prev ( info)
320321 }
321- } ) ;
322+ } ) ) ;
322323 } ) ;
323324
324325 BRIDGE_STATE . with ( |state| state. set ( BridgeState :: Connected ( self ) , f) )
Original file line number Diff line number Diff line change 2929#![ feature( restricted_std) ]
3030#![ feature( rustc_attrs) ]
3131#![ feature( min_specialization) ]
32- #![ feature( panic_update_hook) ]
3332#![ recursion_limit = "256" ]
3433
3534#[ unstable( feature = "proc_macro_internals" , issue = "27812" ) ]
You can’t perform that action at this time.
0 commit comments