3 // ignore-windows target requires uwtable
4 // ignore-wasm32-bare no proper panic=unwind support
5 // compile-flags: -C panic=unwind -C force-unwind-tables=n
7 use std::panic::{self, AssertUnwindSafe};
9 struct Increase<'a>(&'a mut u8);
11 impl Drop for Increase<'_> {
23 fn increase(count: &mut u8) {
24 let _increase = Increase(count);
30 assert!(panic::catch_unwind(AssertUnwindSafe(
32 || increase(&mut count)