Currently we emit a modification for the whole struct/enum if one of its token changes (source). This needs to be refined a bit.
The best solution would be to implement DiagnosticGenerator for StructMetadata and EnumMetadata, so that it handles things more cleanly.
It would also be a good idea to handle cases where an empty named struct is changed into an empty tupled struct (this is not a breaking change, see here).
Currently we emit a modification for the whole struct/enum if one of its token changes (source). This needs to be refined a bit.
The best solution would be to implement
DiagnosticGenerator
forStructMetadata
andEnumMetadata
, so that it handles things more cleanly.It would also be a good idea to handle cases where an empty named struct is changed into an empty tupled struct (this is not a breaking change, see here).