Dead code analysis finds unused types and functions, but doesn't look at struct fields.
struct Foo {
bar: A,
baz: B
}
fn foo() {
let foo = Foo {bar: a, baz: b};
foo.bar.do_something();
// Never read foo.baz again. Compiler doesn't complain.
}
This could also be applied to tuple structs and enum variants.
Dead code analysis finds unused types and functions, but doesn't look at struct fields.
This could also be applied to tuple structs and enum variants.