Skip to content

Commit 0c794fc

Browse files
committed
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(()), | ~~ ```
1 parent 94c5ebf commit 0c794fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/iocp/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ enum WaitableStatus {
11521152
Idle,
11531153

11541154
/// We are waiting on this handle to become signaled.
1155-
Waiting(WaitHandle),
1155+
Waiting(#[allow(dead_code)] WaitHandle),
11561156

11571157
/// This handle has been cancelled.
11581158
Cancelled,

0 commit comments

Comments
 (0)