diff options
| author | David Tolnay <dtolnay@gmail.com> | 2022-04-02 11:12:39 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2022-04-02 11:38:11 -0700 |
| commit | d93af619812711ebf047a8d0e3fa1f86f07d7da9 (patch) | |
| tree | 885943595e7f464f896c17927d892391141f39f3 /library/std/src/thread | |
| parent | c20f8d2fd62344658b53cccf7b599eeb9a8d1de6 (diff) | |
| download | rust-d93af619812711ebf047a8d0e3fa1f86f07d7da9.tar.gz rust-d93af619812711ebf047a8d0e3fa1f86f07d7da9.zip | |
Refer to u8 by absolute path in expansion of thread_local
Diffstat (limited to 'library/std/src/thread')
| -rw-r--r-- | library/std/src/thread/local.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index 587e453ceef..a41cb02a607 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -217,9 +217,9 @@ macro_rules! __thread_local_inner { // 1 == dtor registered, dtor not run // 2 == dtor registered and is running or has run #[thread_local] - static mut STATE: u8 = 0; + static mut STATE: $crate::primitive::u8 = 0; - unsafe extern "C" fn destroy(ptr: *mut u8) { + unsafe extern "C" fn destroy(ptr: *mut $crate::primitive::u8) { let ptr = ptr as *mut $t; unsafe { @@ -235,7 +235,7 @@ macro_rules! __thread_local_inner { // so now. 0 => { $crate::thread::__FastLocalKeyInner::<$t>::register_dtor( - $crate::ptr::addr_of_mut!(VAL) as *mut u8, + $crate::ptr::addr_of_mut!(VAL) as *mut $crate::primitive::u8, destroy, ); STATE = 1; |
