Skip to content

Commit 9c9f6ac

Browse files
committed
Workaround incorrect dead code warning in Rust 1.63
1 parent 4d8d81e commit 9c9f6ac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sys/unix.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,6 +2823,11 @@ impl crate::Socket {
28232823
#[cfg(all(feature = "all", any(target_os = "linux", target_os = "android")))]
28242824
#[repr(transparent)]
28252825
pub struct SockFilter {
2826+
// For some reason Rust 1.63 thinks this field is unused, while it's clearly
2827+
// used in `SockFilter::new`. This issue seems fixed in later Rust versions,
2828+
// but we still need to support 1.63, adding allow(dead_code) ignores the
2829+
// issue.
2830+
#[allow(dead_code)]
28262831
filter: libc::sock_filter,
28272832
}
28282833

0 commit comments

Comments
 (0)