From 5be186063a1b5e468e34a7bae79b3359b1386db3 Mon Sep 17 00:00:00 2001 From: Arthur Carcano Date: Wed, 3 Jan 2024 17:45:41 +0100 Subject: [PATCH] Allow dead code in thread local dtor The dead_code lint was previously eroneously missing this dead code. Since this lint bug has been fixed, the unused field need to be removed or marked as `#[allow(dead_code)]`. Given the nature of this code, I don't feel confident removing the field so it is only marked as allow(dead_code). --- library/std/src/sys/unix/thread_local_dtor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs index 58f7ab84101ae..172cf8185b3a0 100644 --- a/library/std/src/sys/unix/thread_local_dtor.rs +++ b/library/std/src/sys/unix/thread_local_dtor.rs @@ -34,7 +34,7 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) { #[cfg(not(sanitizer_cfi_normalize_integers))] #[cfi_encoding = "i"] #[repr(transparent)] - pub struct c_int(pub libc::c_int); + pub struct c_int(#[allow(dead_code)] pub libc::c_int); extern "C" { #[linkage = "extern_weak"]