Skip to content

Commit 11191fc

Browse files
committed
Fix Miri build
1 parent 0587715 commit 11191fc

File tree

1 file changed

+5
-0
lines changed
  • library/std/src/sys/thread_local/key

1 file changed

+5
-0
lines changed

library/std/src/sys/thread_local/key/unix.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,10 @@ pub unsafe fn destroy(key: Key) {
2929

3030
#[inline]
3131
pub unsafe fn at_process_exit(cb: unsafe extern "C" fn()) {
32+
// Miri does not support atexit.
33+
#[cfg(not(miri))]
3234
assert_eq!(unsafe { libc::atexit(mem::transmute(cb)) }, 0);
35+
36+
#[cfg(miri)]
37+
let _ = cb;
3338
}

0 commit comments

Comments
 (0)