diff options
| author | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2024-01-03 17:45:41 +0100 |
|---|---|---|
| committer | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2024-03-12 10:59:41 +0100 |
| commit | e78851813eadb69b2a299ff794abbed3202e8ba8 (patch) | |
| tree | 6624186ddc9835ef4218d0a0166cee43a20e10aa | |
| parent | 99b8ec2d6e5c8b58d51dcd842a4a9fca9a26cf89 (diff) | |
| download | rust-e78851813eadb69b2a299ff794abbed3202e8ba8.tar.gz rust-e78851813eadb69b2a299ff794abbed3202e8ba8.zip | |
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).
| -rw-r--r-- | library/std/src/sys/pal/unix/thread_local_dtor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/unix/thread_local_dtor.rs b/library/std/src/sys/pal/unix/thread_local_dtor.rs index 79b152cece9..e367ce5f906 100644 --- a/library/std/src/sys/pal/unix/thread_local_dtor.rs +++ b/library/std/src/sys/pal/unix/thread_local_dtor.rs @@ -35,7 +35,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"] |
