From 0c794fce507f30a4f609e98cd30f84588f22578d Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jan 2024 15:44:43 +0900 Subject: [PATCH] Ignore dead_code warning for tuple struct This lint does not take into account destructors. ``` error: field `0` is never read --> src\iocp\mod.rs:1155:13 | 1155 | Waiting(WaitHandle), | ------- ^^^^^^^^^^ | | | field in this variant | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 1155 | Waiting(()), | ~~ ``` --- src/iocp/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iocp/mod.rs b/src/iocp/mod.rs index 16f9d6f..3800a2c 100644 --- a/src/iocp/mod.rs +++ b/src/iocp/mod.rs @@ -1152,7 +1152,7 @@ enum WaitableStatus { Idle, /// We are waiting on this handle to become signaled. - Waiting(WaitHandle), + Waiting(#[allow(dead_code)] WaitHandle), /// This handle has been cancelled. Cancelled,