diff options
| author | oli <oli@uhura.edef.eu> | 2020-10-06 12:25:08 +0000 |
|---|---|---|
| committer | oli <github35764891676564198441@oli-obk.de> | 2020-11-28 17:13:47 +0000 |
| commit | 79fb037cc5f34368de069e8958ffc3a21036d091 (patch) | |
| tree | 2266d04136973722c5a010f6fbf33664919ccf8c /library/std/src/sys/windows | |
| parent | aabe70f90e30c45f13dbdaaed1ea05776e541b8d (diff) | |
| download | rust-79fb037cc5f34368de069e8958ffc3a21036d091.tar.gz rust-79fb037cc5f34368de069e8958ffc3a21036d091.zip | |
Remove now-unnecessary `miri_static_root` invocation
Diffstat (limited to 'library/std/src/sys/windows')
| -rw-r--r-- | library/std/src/sys/windows/thread_local_key.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/library/std/src/sys/windows/thread_local_key.rs b/library/std/src/sys/windows/thread_local_key.rs index 82901871e78..fb2bb0613ee 100644 --- a/library/std/src/sys/windows/thread_local_key.rs +++ b/library/std/src/sys/windows/thread_local_key.rs @@ -110,16 +110,6 @@ struct Node { next: *mut Node, } -#[cfg(miri)] -extern "Rust" { - /// Miri-provided extern function to mark the block `ptr` points to as a "root" - /// for some static memory. This memory and everything reachable by it is not - /// considered leaking even if it still exists when the program terminates. - /// - /// `ptr` has to point to the beginning of an allocated block. - fn miri_static_root(ptr: *const u8); -} - unsafe fn register_dtor(key: Key, dtor: Dtor) { let mut node = Box::new(Node { key, dtor, next: ptr::null_mut() }); @@ -128,9 +118,6 @@ unsafe fn register_dtor(key: Key, dtor: Dtor) { node.next = head; match DTORS.compare_exchange(head, &mut *node, SeqCst, SeqCst) { Ok(_) => { - #[cfg(miri)] - miri_static_root(&*node as *const _ as *const u8); - mem::forget(node); return; } |
