Skip to content

Commit 7fe24bd

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 02233db commit 7fe24bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: std/src/sys/pal/unix/thread_local_dtor.rs

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

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

0 commit comments

Comments
 (0)