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
This lint finds fields that implement Debug but are not printed in a struct's Debug implementation.
This lint would ignore fields in types that do not implement Debug.
Lint Name
debug_missing_field
Category
style, pedantic
Advantage
When adding a new field to a type that implements Debug manually, you may forget to update the Debug implementation. This lint would ensure new fields are linted if not printed in the debug implementation.
Drawbacks
Both tuple and struct debug implementations need to be considered.
Enums are a little more complicated to lint, since you would need check the fields of each variant.
The lint may have false positives if the Debug implementation uses manual write! invocations instead of debug_struct and debug_tuple.
What it does
This lint finds fields that implement Debug but are not printed in a struct's Debug implementation.
This lint would ignore fields in types that do not implement Debug.
Lint Name
debug_missing_field
Category
style, pedantic
Advantage
Drawbacks
Example
Could be written as:
The text was updated successfully, but these errors were encountered: