We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e2bf28 commit 3cc3b28Copy full SHA for 3cc3b28
src/sys/unix.rs
@@ -2823,10 +2823,8 @@ impl crate::Socket {
2823
#[cfg(all(feature = "all", any(target_os = "linux", target_os = "android")))]
2824
#[repr(transparent)]
2825
pub struct SockFilter {
2826
- // For some reason Rust 1.70 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.70, adding allow(dead_code) ignores the
2829
- // issue.
+ // This field is only read indirectly by transmutes / pointer casts, so
+ // rustc emits a spurious warning saying that the field is never read.
2830
#[allow(dead_code)]
2831
filter: libc::sock_filter,
2832
}
0 commit comments