File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,11 @@ fn maybe_install_panic_hook(force_show_panics: bool) {
286
286
BridgeState :: NotConnected => true ,
287
287
BridgeState :: Connected ( _) | BridgeState :: InUse => force_show_panics,
288
288
} ) ;
289
- if show {
289
+ // We normally report panics by catching unwinds and passing the payload from the
290
+ // unwind back to the compiler, but if the panic doesn't unwind we'll abort before
291
+ // the compiler has a chance to print an error. So we special-case PanicInfo where
292
+ // can_unwind is false.
293
+ if show || !info. can_unwind ( ) {
290
294
prev ( info)
291
295
}
292
296
} ) ) ;
Original file line number Diff line number Diff line change 30
30
#![ feature( maybe_uninit_write_slice) ]
31
31
#![ feature( negative_impls) ]
32
32
#![ feature( new_uninit) ]
33
+ #![ feature( panic_can_unwind) ]
33
34
#![ feature( restricted_std) ]
34
35
#![ feature( rustc_attrs) ]
35
36
#![ feature( min_specialization) ]
You can’t perform that action at this time.
0 commit comments