Remove usage of panic_update_hook feature gate

This commit is contained in:
bjorn3 2022-03-25 16:12:21 +01:00
parent e85722946a
commit 681ea25b20
2 changed files with 3 additions and 3 deletions

View file

@ -310,7 +310,8 @@ impl Bridge<'_> {
// NB. the server can't do this because it may use a different libstd.
static HIDE_PANICS_DURING_EXPANSION: Once = Once::new();
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 {
BridgeState::NotConnected => true,
BridgeState::Connected(_) | BridgeState::InUse => force_show_panics,
@ -318,7 +319,7 @@ impl Bridge<'_> {
if show {
prev(info)
}
});
}));
});
BRIDGE_STATE.with(|state| state.set(BridgeState::Connected(self), f))

View file

@ -29,7 +29,6 @@
#![feature(restricted_std)]
#![feature(rustc_attrs)]
#![feature(min_specialization)]
#![feature(panic_update_hook)]
#![recursion_limit = "256"]
#[unstable(feature = "proc_macro_internals", issue = "27812")]