1 #![warn(clippy::manual_non_exhaustive)]
12 // user forgot to remove the marker
21 // marker variant does not have doc hidden attribute, should be ignored
28 // name of variant with doc hidden does not start with underscore, should be ignored
36 // variant with doc hidden is not unit, should be ignored
44 // variant with doc hidden is the only one, should be ignored
50 // variant with multiple markers, should be ignored
51 enum MultipleMarkers {
59 // already non_exhaustive and no markers, should be ignored
74 // user forgot to remove the private field
82 // some other fields are private, should be ignored
83 struct PrivateFields {
89 // private field name does not start with underscore, should be ignored
96 // private field is not unit type, should be ignored
103 // private field is the only field, should be ignored
108 // already non exhaustive and no private fields, should be ignored
110 struct NonExhaustive {
117 struct T(pub i32, pub i32, ());
119 // user forgot to remove the private field
121 struct Tp(pub i32, pub i32, ());
123 // some other fields are private, should be ignored
124 struct PrivateFields(pub i32, i32, ());
126 // private field is not unit type, should be ignored
127 struct NotUnit(pub i32, pub i32, i32);
129 // private field is the only field, should be ignored
130 struct OnlyMarker(());
132 // already non exhaustive and no private fields, should be ignored
134 struct NonExhaustive(pub i32, pub i32);