diff options
| author | Badel2 <2badel2@gmail.com> | 2022-01-05 22:42:21 +0100 |
|---|---|---|
| committer | Badel2 <2badel2@gmail.com> | 2022-01-07 17:28:20 +0100 |
| commit | 8bdf5c3de6c6e4e01f7f6241cd0f2a606c7486df (patch) | |
| tree | 795cf4e3727479f3f82c0ee6eba205b91d9fee6d /src | |
| parent | e012a191d768adeda1ee36a99ef8b92d51920154 (diff) | |
| download | rust-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.rs | 16 |
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"); + }) +} |
