1 #![warn(clippy::manual_non_exhaustive)]
11 // user forgot to remove the private field
19 // some other fields are private, should be ignored
20 struct PrivateFields {
26 // private field name does not start with underscore, should be ignored
33 // private field is not unit type, should be ignored
40 // private field is the only field, should be ignored
45 // already non exhaustive and no private fields, should be ignored
47 struct NonExhaustive {
54 struct T(pub i32, pub i32, ());
56 // user forgot to remove the private field
58 struct Tp(pub i32, pub i32, ());
60 // some other fields are private, should be ignored
61 struct PrivateFields(pub i32, i32, ());
63 // private field is not unit type, should be ignored
64 struct NotUnit(pub i32, pub i32, i32);
66 // private field is the only field, should be ignored
67 struct OnlyMarker(());
69 // already non exhaustive and no private fields, should be ignored
71 struct NonExhaustive(pub i32, pub i32);