(&mut self)
| 212 | #[cfg(feature = "std")] |
| 213 | impl Drop for DeferredDropGuard { |
| 214 | fn drop(&mut self) { |
| 215 | IN_DEFERRED_CONTEXT.with(|in_ctx| { |
| 216 | in_ctx.set(self.was_in_context); |
| 217 | }); |
| 218 | // Only flush if we're the outermost context and not already panicking |
| 219 | // (flushing during unwinding risks double-panic → process abort). |
| 220 | if !self.was_in_context && !std::thread::panicking() { |
| 221 | flush_deferred_drops(); |
| 222 | } |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | /// Execute a function within a deferred drop context. |
nothing calls this directly
no test coverage detected