Skip to content

Commit

Permalink
Allow dead code in thread local dtor
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
krtab committed Jan 5, 2024
1 parent b3cdb55 commit 5be1860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/thread_local_dtor.rs
Expand Up @@ -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"]
Expand Down

0 comments on commit 5be1860

Please sign in to comment.