@@ -55,24 +55,24 @@ pub macro thread_local_inner {
5555
5656 // Used to generate the `LocalKey` value for const-initialized thread locals.
5757 ( @key $t: ty, $( #[ $align_attr: meta] ) * , const $init: expr) => { {
58- const __INIT : $t = $init;
58+ const __RUST_STD_INTERNAL_INIT : $t = $init;
5959
6060 unsafe {
6161 $crate:: thread:: LocalKey :: new ( const {
6262 if $crate:: mem:: needs_drop :: < $t> ( ) {
6363 |_| {
6464 #[ thread_local]
6565 $( #[ $align_attr] ) *
66- static VAL : $crate:: thread:: local_impl:: EagerStorage <$t>
67- = $crate:: thread:: local_impl:: EagerStorage :: new ( __INIT ) ;
68- VAL . get ( )
66+ static __RUST_STD_INTERNAL_VAL : $crate:: thread:: local_impl:: EagerStorage <$t>
67+ = $crate:: thread:: local_impl:: EagerStorage :: new ( __RUST_STD_INTERNAL_INIT ) ;
68+ __RUST_STD_INTERNAL_VAL . get ( )
6969 }
7070 } else {
7171 |_| {
7272 #[ thread_local]
7373 $( #[ $align_attr] ) *
74- static VAL : $t = __INIT ;
75- & VAL
74+ static __RUST_STD_INTERNAL_VAL : $t = __RUST_STD_INTERNAL_INIT ;
75+ & __RUST_STD_INTERNAL_VAL
7676 }
7777 }
7878 } )
@@ -82,27 +82,27 @@ pub macro thread_local_inner {
8282 // used to generate the `LocalKey` value for `thread_local!`
8383 ( @key $t: ty, $( #[ $align_attr: meta] ) * , $init: expr) => { {
8484 #[ inline]
85- fn __init ( ) -> $t {
85+ fn __rust_std_internal_init_fn ( ) -> $t {
8686 $init
8787 }
8888
8989 unsafe {
9090 $crate:: thread:: LocalKey :: new ( const {
9191 if $crate:: mem:: needs_drop :: < $t> ( ) {
92- |init | {
92+ |__rust_std_internal_init | {
9393 #[ thread_local]
9494 $( #[ $align_attr] ) *
95- static VAL : $crate:: thread:: local_impl:: LazyStorage <$t, ( ) >
95+ static __RUST_STD_INTERNAL_VAL : $crate:: thread:: local_impl:: LazyStorage <$t, ( ) >
9696 = $crate:: thread:: local_impl:: LazyStorage :: new ( ) ;
97- VAL . get_or_init ( init , __init )
97+ __RUST_STD_INTERNAL_VAL . get_or_init ( __rust_std_internal_init , __rust_std_internal_init_fn )
9898 }
9999 } else {
100- |init | {
100+ |__rust_std_internal_init | {
101101 #[ thread_local]
102102 $( #[ $align_attr] ) *
103- static VAL : $crate:: thread:: local_impl:: LazyStorage <$t, !>
103+ static __RUST_STD_INTERNAL_VAL : $crate:: thread:: local_impl:: LazyStorage <$t, !>
104104 = $crate:: thread:: local_impl:: LazyStorage :: new ( ) ;
105- VAL . get_or_init ( init , __init )
105+ __RUST_STD_INTERNAL_VAL . get_or_init ( __rust_std_internal_init , __rust_std_internal_init_fn )
106106 }
107107 }
108108 } )
0 commit comments