(&mut self)
| 206 | |
| 207 | impl Drop for DiagnosticScopeGuard { |
| 208 | fn drop(&mut self) { |
| 209 | if self.owns { |
| 210 | DIAGNOSTIC_SCOPE.with(|cell| { |
| 211 | *cell.borrow_mut() = None; |
| 212 | }); |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | /// RAII guard that resets [`BUILDING_SCOPES`] to `false` on drop. |