encode_fields!
This will make sure the encoder will get updated if any new fields are added to Diagnostic.
--extern-loc