Skip to content

Commit d93af61

Browse files
committed
Refer to u8 by absolute path in expansion of thread_local
1 parent c20f8d2 commit d93af61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/std/src/thread/local.rs

+3-3
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)