File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,14 @@ fn handle_rt_panic<T>(e: Box<dyn Any + Send>) -> T {
109109// `compiler/rustc_session/src/config/sigpipe.rs`.
110110#[ cfg_attr( test, allow( dead_code) ) ]
111111unsafe fn init ( argc : isize , argv : * const * const u8 , sigpipe : u8 ) {
112+ // Remember the main thread ID to give it the correct name.
113+ // SAFETY: this is the only time and place where we call this function.
114+ unsafe { main_thread:: set ( thread:: current_id ( ) ) } ;
115+
112116 #[ cfg_attr( target_os = "teeos" , allow( unused_unsafe) ) ]
113117 unsafe {
114118 sys:: init ( argc, argv, sigpipe)
115119 } ;
116-
117- // Remember the main thread ID to give it the correct name.
118- // SAFETY: this is the only time and place where we call this function.
119- unsafe { main_thread:: set ( thread:: current_id ( ) ) } ;
120120}
121121
122122/// Clean up the thread-local runtime state. This *should* be run after all other
You can’t perform that action at this time.
0 commit comments