diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-03-25 16:12:21 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-03-25 17:24:27 +0100 |
| commit | 681ea25b2016723cac03bc4f1682f50860d560d3 (patch) | |
| tree | 9f876ec6c3c3305e5a7766b6b0bfb6d24df7e1d6 | |
| parent | e85722946af6ae7d6ba8b6c7459d6ae6c5554216 (diff) | |
| download | rust-681ea25b2016723cac03bc4f1682f50860d560d3.tar.gz rust-681ea25b2016723cac03bc4f1682f50860d560d3.zip | |
Remove usage of panic_update_hook feature gate
| -rw-r--r-- | library/proc_macro/src/bridge/client.rs | 5 | ||||
| -rw-r--r-- | library/proc_macro/src/lib.rs | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/proc_macro/src/bridge/client.rs b/library/proc_macro/src/bridge/client.rs index 9e9750eb8de..83a2ac6f0d4 100644 --- a/library/proc_macro/src/bridge/client.rs +++ b/library/proc_macro/src/bridge/client.rs @@ -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)) diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index fba3bec43d5..088d32ed16f 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -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")] |
