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<'_> {
310
310
// NB. the server can't do this because it may use a different libstd.
311
311
static HIDE_PANICS_DURING_EXPANSION : Once = Once :: new ( ) ;
312
312
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| {
314
315
let show = BridgeState :: with ( |state| match state {
315
316
BridgeState :: NotConnected => true ,
316
317
BridgeState :: Connected ( _) | BridgeState :: InUse => force_show_panics,
317
318
} ) ;
318
319
if show {
319
320
prev ( info)
320
321
}
321
- } ) ;
322
+ } ) ) ;
322
323
} ) ;
323
324
324
325
BRIDGE_STATE . with ( |state| state. set ( BridgeState :: Connected ( self ) , f) )
Original file line number Diff line number Diff line change 29
29
#![ feature( restricted_std) ]
30
30
#![ feature( rustc_attrs) ]
31
31
#![ feature( min_specialization) ]
32
- #![ feature( panic_update_hook) ]
33
32
#![ recursion_limit = "256" ]
34
33
35
34
#[ unstable( feature = "proc_macro_internals" , issue = "27812" ) ]
You can’t perform that action at this time.
0 commit comments