derive(Clone, Debug) should not prevent "field is never read" from firing · Issue #84647 · rust-lang/rust (original) (raw)
struct A { f: () } #[derive(Clone)] struct B { f: () }
fn main() { let _ = A { f: () }; let _ = B { f: () }; }
Only A
's field triggers the warning. It's clear why B
doesn't do this, but it clearly should. Doesn't seem easy to fix though :(