3 // ignore-wasm32-bare compiled with panic=abort by default
7 impl<'a> panic::UnwindSafe for Foo<'a> {}
8 impl<'a> panic::RefUnwindSafe for Foo<'a> {}
10 struct Foo<'a>(&'a mut bool);
12 impl<'a> Drop for Foo<'a> {
18 fn f<T: FnOnce()>(t: T) {
23 let mut ran_drop = false;
25 let x = Foo(&mut ran_drop);
26 let x = move || { let _ = x; };
31 let mut ran_drop = false;
33 let x = Foo(&mut ran_drop);
34 let result = panic::catch_unwind(move || {
35 let x = move || { let _ = x; panic!() };
38 assert!(result.is_err());