Remove usage of panic_update_hook feature gate
This commit is contained in:
@@ -310,7 +310,8 @@ impl Bridge<'_> {
|
|||||||
// NB. the server can't do this because it may use a different libstd.
|
// NB. the server can't do this because it may use a different libstd.
|
||||||
static HIDE_PANICS_DURING_EXPANSION: Once = Once::new();
|
static HIDE_PANICS_DURING_EXPANSION: Once = Once::new();
|
||||||
HIDE_PANICS_DURING_EXPANSION.call_once(|| {
|
HIDE_PANICS_DURING_EXPANSION.call_once(|| {
|
||||||
panic::update_hook(move |prev, info| {
|
let prev = panic::take_hook();
|
||||||
|
panic::set_hook(Box::new(move |info| {
|
||||||
let show = BridgeState::with(|state| match state {
|
let show = BridgeState::with(|state| match state {
|
||||||
BridgeState::NotConnected => true,
|
BridgeState::NotConnected => true,
|
||||||
BridgeState::Connected(_) | BridgeState::InUse => force_show_panics,
|
BridgeState::Connected(_) | BridgeState::InUse => force_show_panics,
|
||||||
@@ -318,7 +319,7 @@ impl Bridge<'_> {
|
|||||||
if show {
|
if show {
|
||||||
prev(info)
|
prev(info)
|
||||||
}
|
}
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
BRIDGE_STATE.with(|state| state.set(BridgeState::Connected(self), f))
|
BRIDGE_STATE.with(|state| state.set(BridgeState::Connected(self), f))
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
#![feature(restricted_std)]
|
#![feature(restricted_std)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
#![feature(panic_update_hook)]
|
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
#[unstable(feature = "proc_macro_internals", issue = "27812")]
|
#[unstable(feature = "proc_macro_internals", issue = "27812")]
|
||||||
|
|||||||
Reference in New Issue
Block a user