diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index 37525e50604..3dcf7e33453 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -217,7 +217,7 @@ unsafe fn __getit() -> $crate::option::Option<&'static $t> { // so now. 0 => { $crate::thread::__FastLocalKeyInner::<$t>::register_dtor( - &VAL as *const _ as *mut u8, + $crate::ptr::addr_of_mut!(VAL) as *mut u8, destroy, ); STATE = 1;