about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBadel2 <2badel2@gmail.com>2022-01-05 22:42:21 +0100
committerBadel2 <2badel2@gmail.com>2022-01-07 17:28:20 +0100
commit8bdf5c3de6c6e4e01f7f6241cd0f2a606c7486df (patch)
tree795cf4e3727479f3f82c0ee6eba205b91d9fee6d /src
parente012a191d768adeda1ee36a99ef8b92d51920154 (diff)
downloadrust-8bdf5c3de6c6e4e01f7f6241cd0f2a606c7486df.tar.gz
rust-8bdf5c3de6c6e4e01f7f6241cd0f2a606c7486df.zip
Implement panic::update_hook
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/panics/panic-while-updating-hook.rs16
1 files changed, 16 insertions, 0 deletions
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");
+    })
+}