about summary refs log tree commit diff
path: root/library/std/src/rt.rs
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2024-11-25 09:50:24 +0100
committerjoboet <jonasboettiger@icloud.com>2025-01-14 13:37:25 +0100
commit0e5ee891b2b07321175e398153bfa86c667f3494 (patch)
tree0ea9955cb81d668b7324e821bdf85a66e1176ee6 /library/std/src/rt.rs
parenta48e7b00570baaaba9d32d783d5702c06afd104d (diff)
downloadrust-0e5ee891b2b07321175e398153bfa86c667f3494.tar.gz
rust-0e5ee891b2b07321175e398153bfa86c667f3494.zip
Revert "Remove the Arc rt::init allocation for thread info"
This reverts commit 0747f2898e83df7e601189c0f31762e84328becb.
Diffstat (limited to 'library/std/src/rt.rs')
-rw-r--r--library/std/src/rt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/rt.rs b/library/std/src/rt.rs
index 24a362072ab..56952aac6c6 100644
--- a/library/std/src/rt.rs
+++ b/library/std/src/rt.rs
@@ -110,7 +110,7 @@ unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
     // handle does not match the current ID, we should attempt to use the
     // current thread ID here instead of unconditionally creating a new
     // one. Also see #130210.
-    let thread = unsafe { Thread::new_main(thread::current_id()) };
+    let thread = Thread::new_main(thread::current_id());
     if let Err(_thread) = thread::set_current(thread) {
         // `thread::current` will create a new handle if none has been set yet.
         // Thus, if someone uses it before main, this call will fail. That's a