File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,9 @@ macro_rules! __thread_local_inner {
217217 // 1 == dtor registered, dtor not run
218218 // 2 == dtor registered and is running or has run
219219 #[ thread_local]
220- static mut STATE : u8 = 0 ;
220+ static mut STATE : $crate :: primitive :: u8 = 0 ;
221221
222- unsafe extern "C" fn destroy( ptr: * mut u8 ) {
222+ unsafe extern "C" fn destroy( ptr: * mut $crate :: primitive :: u8 ) {
223223 let ptr = ptr as * mut $t;
224224
225225 unsafe {
@@ -235,7 +235,7 @@ macro_rules! __thread_local_inner {
235235 // so now.
236236 0 => {
237237 $crate:: thread:: __FastLocalKeyInner:: <$t>:: register_dtor(
238- $crate:: ptr:: addr_of_mut!( VAL ) as * mut u8 ,
238+ $crate:: ptr:: addr_of_mut!( VAL ) as * mut $crate :: primitive :: u8 ,
239239 destroy,
240240 ) ;
241241 STATE = 1 ;
Original file line number Diff line number Diff line change 1+ // check-pass
2+
3+ #[ allow( non_camel_case_types) ]
4+ struct u8 ;
5+
6+ std:: thread_local! {
7+ pub static A : i32 = f( ) ;
8+ pub static B : i32 = const { 0 } ;
9+ }
10+
11+ fn f ( ) -> i32 {
12+ 0
13+ }
14+
15+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments