From 9c486a74dac6f11276df4bbd2abc526a82cd000f Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 7 Feb 2025 18:00:20 +0000 Subject: Mark link_section attr with unsafe --- library/std/src/sys/thread_local/guard/windows.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/std/src/sys/thread_local') diff --git a/library/std/src/sys/thread_local/guard/windows.rs b/library/std/src/sys/thread_local/guard/windows.rs index 1752b0e1208..b15a0d7c0bd 100644 --- a/library/std/src/sys/thread_local/guard/windows.rs +++ b/library/std/src/sys/thread_local/guard/windows.rs @@ -74,7 +74,7 @@ pub fn enable() { unsafe { ptr::from_ref(&CALLBACK).read_volatile() }; } -#[link_section = ".CRT$XLB"] +#[unsafe(link_section = ".CRT$XLB")] #[cfg_attr(miri, used)] // Miri only considers explicitly `#[used]` statics for `lookup_link_section` pub static CALLBACK: unsafe extern "system" fn(*mut c_void, u32, *mut c_void) = tls_callback; -- cgit 1.4.1-3-g733a5