You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometime in the last week the rustc nightly compiler got more aggressive about reporting dead_code warnings. It now warns whenever a struct contains a private field but no constructor. That catches many structs in libc, which are intended to be initialized with std::mem::zeroed(). IMHO this is a rustc bug. This ought to be a separate lint so it can be silenced without silencing all dead_code warnings.
I don't think the change is going to get reverted or changed IMO. One workaround would be to add allow(dead_code) to all affected structs, but that can easily hide potential problems. Another is to change all the private fields to public, and I think this was the suggestion in the upstream issue.
Activity
my4ng commentedon Jun 13, 2024
I don't think the change is going to get reverted or changed IMO. One workaround would be to add
allow(dead_code)
to all affected structs, but that can easily hide potential problems. Another is to change all the private fields to public, and I think this was the suggestion in the upstream issue.master
ferrocene/ferrocene#685Harmonize with upstream
Harmonize with upstream
tgross35 commentedon Aug 29, 2024
With rust-lang/rust#128404, I think this has been resolved.
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`
lints: Remove `allow(dead_code)`