Skip to content

Commit f364f90

Browse files
committed
add an assertion
1 parent e5e1ae8 commit f364f90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shims/tls.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ impl<'tcx> TlsData<'tcx> {
192192
data.remove(&thread_id);
193193
}
194194

195-
self.macos_thread_dtors.remove(&thread_id);
195+
if let Some(dtors) = self.macos_thread_dtors.remove(&thread_id) {
196+
assert!(dtors.is_empty(), "the destructors should have already been run");
197+
}
196198
}
197199
}
198200

0 commit comments

Comments
 (0)