]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys_common/thread_info.rs
Auto merge of #104361 - vladimir-ea:watchos_fix_linking, r=oli-obk
[rust.git] / library / std / src / sys_common / thread_info.rs
index b8f2e658214b9804e942b22a300e3e58d1f7c4f4..38c9e50009af5eb98193dc559b4dac28834083d3 100644 (file)
@@ -30,15 +30,6 @@ fn with<R, F>(f: F) -> Option<R>
     }
 }
 
-/// Get an address that is unique per running thread.
-///
-/// This can be used as a non-null usize-sized ID.
-pub fn current_thread_unique_ptr() -> usize {
-    // Use a non-drop type to make sure it's still available during thread destruction.
-    thread_local! { static X: u8 = 0 }
-    X.with(|x| <*const _>::addr(x))
-}
-
 pub fn current_thread() -> Option<Thread> {
     ThreadInfo::with(|info| info.thread.clone())
 }