From 7d008267dddcda74ebdb83d3da9b3f16c7f56973 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Fri, 5 Apr 2024 12:50:31 +0000 Subject: Revert #121666 This reverts #121666 due to #123495 --- library/std/src/thread/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'library/std/src/thread/mod.rs') diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index f7eb92bc61e..5d9f452c556 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -694,9 +694,7 @@ pub(crate) fn set_current(thread: Thread) { /// In contrast to the public `current` function, this will not panic if called /// from inside a TLS destructor. pub(crate) fn try_current() -> Option { - CURRENT - .try_with(|current| current.get_or_init(|| Thread::new(imp::Thread::get_name())).clone()) - .ok() + CURRENT.try_with(|current| current.get_or_init(|| Thread::new(None)).clone()).ok() } /// Gets a handle to the thread that invokes it. -- cgit 1.4.1-3-g733a5