()
| 125 | |
| 126 | #[test] |
| 127 | fn unwind_nested2() { |
| 128 | assert_eq!(check_and_reset(), false); |
| 129 | assert_no_alloc(|| { |
| 130 | assert_no_alloc(|| { |
| 131 | let r = catch_unwind(|| { |
| 132 | assert_no_alloc(|| { |
| 133 | assert_no_alloc(|| { |
| 134 | panic!(); |
| 135 | }); |
| 136 | }); |
| 137 | }); |
| 138 | assert!(r.is_err()); |
| 139 | |
| 140 | check_and_reset(); // unwinding might have allocated memory; we don't care about that. |
| 141 | do_alloc(); |
| 142 | assert_eq!(check_and_reset(), true); |
| 143 | }); |
| 144 | }); |
| 145 | check_and_reset(); // unwinding might have allocated memory; we don't care about that. |
| 146 | do_alloc(); |
| 147 | assert_eq!(check_and_reset(), false); |
| 148 | } |
nothing calls this directly
no test coverage detected