Skip to content

Commit 5be1860

Browse files
committed
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).
1 parent b3cdb55 commit 5be1860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/thread_local_dtor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
3434
#[cfg(not(sanitizer_cfi_normalize_integers))]
3535
#[cfi_encoding = "i"]
3636
#[repr(transparent)]
37-
pub struct c_int(pub libc::c_int);
37+
pub struct c_int(#[allow(dead_code)] pub libc::c_int);
3838

3939
extern "C" {
4040
#[linkage = "extern_weak"]

0 commit comments

Comments
 (0)