From 8bdf5c3de6c6e4e01f7f6241cd0f2a606c7486df Mon Sep 17 00:00:00 2001 From: Badel2 <2badel2@gmail.com> Date: Wed, 5 Jan 2022 22:42:21 +0100 Subject: Implement panic::update_hook --- src/test/ui/panics/panic-while-updating-hook.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/ui/panics/panic-while-updating-hook.rs (limited to 'src') diff --git a/src/test/ui/panics/panic-while-updating-hook.rs b/src/test/ui/panics/panic-while-updating-hook.rs new file mode 100644 index 00000000000..8c95f1b8b78 --- /dev/null +++ b/src/test/ui/panics/panic-while-updating-hook.rs @@ -0,0 +1,16 @@ +// run-fail +// error-pattern: panicked while processing panic +#![allow(stable_features)] + +// ignore-emscripten no threads support + +#![feature(std_panic)] +#![feature(panic_update_hook)] + +use std::panic; + +fn main() { + panic::update_hook(|_prev| { + panic!("inside update_hook"); + }) +} -- cgit 1.4.1-3-g733a5