Skip to content

Commit 681ea25

Browse files
committed
Remove usage of panic_update_hook feature gate
1 parent e857229 commit 681ea25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/proc_macro/src/bridge/client.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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))

library/proc_macro/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
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")]

0 commit comments

Comments
 (0)